Selected item

2 posts, 0 answers
  1. Alain
    Alain avatar
    13 posts
    Member since:
    Mar 2011

    Posted 30 Aug 2013 Link to this post

    Since RadSlideView does not implement SelectedIndex, I'd like to know how I could actually retrieve the currently SelectedItem from the TextBlock which contains my the ID for the selected item.

    <telerikPrimitives:RadSlideView Grid.Row="0"
                                                x:Name="slideView"
                                                ItemsSource="{Binding AllSource}"
                                                AdjacentItemsPreviewMode="Both"
                                                ItemTemplate="{StaticResource SlideViewItemTemplate}" SelectionChanged="slideView_SelectionChanged" />
                 
                <StackPanel Grid.Row="1" Margin="52,20,24,12">
                     
                    <TextBlock Text="{Binding ElementName=slideView,Path=SelectedItem.ID}" FontSize="{StaticResource PhoneFontSizeExtraLarge}" FontFamily="{StaticResource PhoneFontFamilySemiLight}" TextWrapping="Wrap"/>
                  </StackPanel>

    Any pointer in the right direction would be welcome.

    Thanks,
    Alain

  2. Alain
    Alain avatar
    13 posts
    Member since:
    Mar 2011

    Posted 31 Aug 2013 Link to this post

    Problem solved <obviously>.

    However, I was experimenting with the RadSlideView adding for example the following to the xaml code

    SelectedItem="{Binding Path=SelectedItem.ID, Mode=OneWay}"


     and was wondering if there was a way of setting the property that way in xaml and then retrieving it with:

    slideView.SelectedItem;

     


    Thank you,
    Alain


     

  3. DevCraft banner
Back to Top