This question is locked. New answers and comments are not allowed.
Hello, I'm working with a DataBoundListBox and I can't find a way to get the right RadDataBoundListBoxItem instance to pass to the ActivateItemReorderForItem method. Here is a part of my code.
This is the DataTemplate for every element inside my ListBox
And this is my listBox:
My source is an ObservableCollection. How can I pick an element from that collection and enable the itemReorderMode for that element?
I need the IsItemReorderEnabled parameter to be set to False, and I just want to enable that mode for a given item programmaticaly.
That method only accepts a RadDataBoundListBoxItem object, and I don't know how to get that from the actual element I pick from my ObservableCollection.
Thanks in advance :)
Sergio
This is the DataTemplate for every element inside my ListBox
<Page.Resources> <DataTemplate x:Key="ListBoxItemTemplate"> <ContentControl Holding="ContentControl_Holding"> <Grid> <Grid.Resources> <converters:FolderContentConverter x:Key="FolderConverter"/> </Grid.Resources> <Grid.ColumnDefinitions> <ColumnDefinition Width="0.2*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid Margin="10"> <Canvas Background="{StaticResource PhoneAccentBrush}"/> <Image Source="/Assets/MainUI/folder.png"/> </Grid> <StackPanel Grid.Column="1"> <TextBlock Text="{Binding Name}" VerticalAlignment="Center" FontSize="25" FontWeight="SemiLight"/> <TextBlock Text="{Binding FolderContent, Converter={StaticResource FolderConverter}}" VerticalAlignment="Center" Foreground="#FFA0A0A0" FontSize="16" FontWeight="SemiLight"/> </StackPanel> </Grid> </ContentControl> </DataTemplate>And this is my listBox:
<Primitives:RadDataBoundListBox x:Name="listBox" ItemsSource="{Binding Source}" ItemTap="listBox_ItemTap" Tapped="listBox_Tapped" ItemTemplate="{StaticResource ListBoxItemTemplate}" ItemReorderStateChanged="listBox_ItemReorderStateChanged"/>My source is an ObservableCollection. How can I pick an element from that collection and enable the itemReorderMode for that element?
I need the IsItemReorderEnabled parameter to be set to False, and I just want to enable that mode for a given item programmaticaly.
That method only accepts a RadDataBoundListBoxItem object, and I don't know how to get that from the actual element I pick from my ObservableCollection.
Thanks in advance :)
Sergio