【发布时间】:2012-04-24 11:02:39
【问题描述】:
我正在尝试将 ExpanderViewer 与 Binding 一起使用,我遵循了 tutorial
现在我需要一个在点击 ExpanderViewer 项目之一时触发的事件。这可能吗?
【问题讨论】:
标签: wpf silverlight windows-phone-7 silverlight-toolkit
我正在尝试将 ExpanderViewer 与 Binding 一起使用,我遵循了 tutorial
现在我需要一个在点击 ExpanderViewer 项目之一时触发的事件。这可能吗?
【问题讨论】:
标签: wpf silverlight windows-phone-7 silverlight-toolkit
我正在使用这个:<Controls:ExpanderView Expanded="ExpanderView_Expanded" />
对于每个项目,您必须在数据模板中添加事件,例如:
<phone:PhoneApplicationPage.Resources>
<DataTemplate x:Key="CustomHeaderTemplate">
<CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked"/>
<TextBlock Text="{Binding Name}" FontSize="{StaticResource PhoneFontSizeExtraLarge}" FontFamily="{StaticResource PhoneFontFamilySemiLight}"/>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
【讨论】: