sort LeftMainContent

This commit is contained in:
Mahdi Hosseini 2019-01-10 09:24:50 +03:30
parent 7417a1715b
commit 9b827cba3c
2 changed files with 6 additions and 3 deletions

View File

@ -15,7 +15,7 @@
</i:EventTrigger>
</i:Interaction.Triggers>
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Styles}">
<ListBox BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBox Name="listStyle" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Tag="{x:Static data:MessageToken.BrushDemoCtl}" Content="{x:Static langs:Lang.Brush}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Brush_16x.png"/>
@ -144,7 +144,7 @@
</ListBox>
</TabItem>
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Controls}">
<ListBox BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBox Name="listControl" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Tag="{x:Static data:MessageToken.NumericUpDownDemoCtl}" Content="{x:Static langs:Lang.NumericUpDown}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/NumericListBox_16x.png"/>

View File

@ -1,4 +1,5 @@
using System.Windows.Controls;
using System.ComponentModel;
using System.Windows.Controls;
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
@ -11,6 +12,8 @@ namespace HandyControlDemo.UserControl
public LeftMainContent()
{
InitializeComponent();
listStyle.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
listControl.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
}
private void TabControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)