Hi,
I have some custom sorting for RadTreeView (ASC and DESC)...but I need the indicating arrows to go with them in my TextBlock above that triggers the sorting...Is that possible ? Any help is appreciated.
Barry
<TextBlock Text="{x:Static properties:Resources.GroupHeader}" MouseUp="TextBlock_MouseUp" TextAlignment="Center" Style="{StaticResource HeaderTemplate}" HorizontalAlignment="Stretch"/>
//GROUP CUSTOM SEARCH
private void TextBlock_MouseUp(object sender, MouseButtonEventArgs e)
{
isoProvider.LoadFromStorage(groupTreeViewIsolatedStorage); //GET
IEnumerable<GroupVM> groups = GroupTree.ItemsSource as IEnumerable<GroupVM>;
if (GroupTreeViewOrdering.Content.Equals(ConstantsUnit.Key_SortAscending))
{
IEnumerable<GroupVM> test = groups.OrderByDescending(p => p.Name);
GroupTree.ItemsSource = null;
while (GroupTree.ItemsSource == null) {
GroupTree.ItemsSource = test;
}
//GroupTree.ItemsSource = groups.OrderByDescending(p => p.Name);
GroupTreeViewOrdering.Content = ConstantsUnit.Key_SortDescending;
}
else if (GroupTreeViewOrdering.Content.Equals(ConstantsUnit.Key_SortDescending))
{
IEnumerable<GroupVM> test = groups.OrderBy(p => p.Name);
GroupTree.ItemsSource = null;
while (GroupTree.ItemsSource == null) {
GroupTree.ItemsSource = test;
}
//GroupTree.ItemsSource = groups.OrderBy(p => p.Name);
GroupTreeViewOrdering.Content = ConstantsUnit.Key_SortAscending;
}
isoProvider.SaveToStorage(groupTreeViewIsolatedStorage); //SET
}