Search code examples
wpfsilverlightwindows-phone-7silverlight-toolkit

ExpanderViewer selectionchanged or selectedItem (Windows Phone)


I'm trying to use ExpanderViewer with Binding, I followed this tutorial

now I need an event that fires on taping on one of the ExpanderViewer Items. is that possible?


Solution

  • I'm using this: <Controls:ExpanderView Expanded="ExpanderView_Expanded" />

    And for every item separately you have to add the events in the datatemplate, for example:

    <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>