This question is locked. New answers and comments are not allowed.
Hi,
I'm trying go get the index of the ContentTemplate but works only for the 'RadExpanderControl.ContentTemplate' but not the 'RadExpanderControl.AnimatedIndicatorContentTemplate'
Here is my xaml :
and my .cs
Regards,
Chahine
I'm trying go get the index of the ContentTemplate but works only for the 'RadExpanderControl.ContentTemplate' but not the 'RadExpanderControl.AnimatedIndicatorContentTemplate'
Here is my xaml :
<telerikPrimitives:RadDataBoundListBox> <telerikPrimitives:RadDataBoundListBox.ItemTemplate> <DataTemplate> <telerikPrimitives:RadExpanderControl ExpandableContent="{Binding}" Content="{Binding}" BorderThickness="0, 3, 0, 0" BorderBrush="{StaticResource PhoneSubtleBrush}" Template="{StaticResource CustomAnimatedIndicatorExpanderTemplate}"> <telerikPrimitives:RadExpanderControl.AnimatedIndicatorContentTemplate> <DataTemplate> <Rectangle Width="40" Height="40" Fill="{StaticResource AccentColor}" Tap="Rectangle_Tap" Tag="{Binding index}"> <Rectangle.OpacityMask> <ImageBrush ImageSource="Images/ExpanderArrow.png"/> </Rectangle.OpacityMask> </Rectangle> </DataTemplate> </telerikPrimitives:RadExpanderControl.AnimatedIndicatorContentTemplate> <telerikPrimitives:RadExpanderControl.ContentTemplate> <DataTemplate> <Grid Tap="Grid_Tap" Tag="{Binding index}"> <TextBlock Margin="1,12,1,20" Text="{Binding index, StringFormat='INDEX\{0\}'}"/> </Grid> </DataTemplate> </telerikPrimitives:RadExpanderControl.ContentTemplate> <telerikPrimitives:RadExpanderControl.ExpandableContentTemplate> <DataTemplate> ... </DataTemplate> </telerikPrimitives:RadExpanderControl.ExpandableContentTemplate> </telerikPrimitives:RadExpanderControl> </DataTemplate> </telerikPrimitives:RadDataBoundListBox.ItemTemplate></telerikPrimitives:RadDataBoundListBox>and my .cs
private void Grid_Tap(object sender, System.Windows.Input.GestureEventArgs e){ var i = (sender as Grid).Tag; // value is correct}private void Rectangle_Tap(object sender, System.Windows.Input.GestureEventArgs e){ var i = (sender as Rectangle).Tag; // value always equal to null}Regards,
Chahine