From 9b827cba3c83f07af296ae71aab11f20497913b9 Mon Sep 17 00:00:00 2001 From: Mahdi Hosseini Date: Thu, 10 Jan 2019 09:24:50 +0330 Subject: [PATCH 1/4] sort LeftMainContent --- HandyControlDemo/UserControl/Main/LeftMainContent.xaml | 4 ++-- HandyControlDemo/UserControl/Main/LeftMainContent.xaml.cs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml index c7abc8a1..6c6d7552 100644 --- a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml +++ b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml @@ -15,7 +15,7 @@ - + @@ -144,7 +144,7 @@ - + diff --git a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml.cs b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml.cs index e7073b17..2268f3d9 100644 --- a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml.cs +++ b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml.cs @@ -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) From d0094f049e8b86a57267b970a367ebb1e0a5e7ff Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Thu, 17 Jan 2019 15:00:08 +0800 Subject: [PATCH 2/4] add support for search --- HandyControl/Controls/Input/SearchBar.cs | 4 +- .../Styles/Base/SearchBarBaseStyle.xaml | 11 +- HandyControlDemo/HandyControlDemo.csproj | 1 + .../Properties/Langs/Lang.Designer.cs | 11 +- .../Properties/Langs/Lang.en.resx | 3 + HandyControlDemo/Properties/Langs/Lang.resx | 3 + .../SortAscending_grey_16x.png | Bin 0 -> 356 bytes .../UserControl/Main/LeftMainContent.xaml | 646 +++++++++--------- .../UserControl/Main/LeftMainContent.xaml.cs | 50 +- 9 files changed, 415 insertions(+), 314 deletions(-) create mode 100644 HandyControlDemo/Resources/Img/LeftMainContent/SortAscending_grey_16x.png diff --git a/HandyControl/Controls/Input/SearchBar.cs b/HandyControl/Controls/Input/SearchBar.cs index cc19ed54..864d3b39 100644 --- a/HandyControl/Controls/Input/SearchBar.cs +++ b/HandyControl/Controls/Input/SearchBar.cs @@ -28,7 +28,7 @@ namespace HandyControl.Controls { RaiseEvent(new FunctionEventArgs(SearchStartedEvent, this) { - Source = Text + Info = Text }); })); } @@ -72,7 +72,7 @@ namespace HandyControl.Controls { RaiseEvent(new FunctionEventArgs(SearchStartedEvent, this) { - Source = Text + Info = Text }); } } diff --git a/HandyControl/Themes/Styles/Base/SearchBarBaseStyle.xaml b/HandyControl/Themes/Styles/Base/SearchBarBaseStyle.xaml index bf499612..7285a243 100644 --- a/HandyControl/Themes/Styles/Base/SearchBarBaseStyle.xaml +++ b/HandyControl/Themes/Styles/Base/SearchBarBaseStyle.xaml @@ -16,6 +16,7 @@ + @@ -28,7 +29,7 @@