From 8ca34e6e5eb91a8555d83328aa12eebbf840c8ba Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Wed, 21 Nov 2018 10:29:18 +0800 Subject: [PATCH] add listview style --- HandyControl/HandyControl.csproj | 4 + HandyControl/Themes/Styles/ListView.xaml | 115 ++++++++++++++++++ HandyControl/Themes/Styles/Style.xaml | 1 + HandyControlDemo/Data/MessageToken.cs | 2 + HandyControlDemo/Data/MessageToken.tt | 3 +- HandyControlDemo/HandyControlDemo.csproj | 8 ++ .../Properties/Langs/Lang.Designer.cs | 9 ++ .../Properties/Langs/Lang.en.resx | 3 + HandyControlDemo/Properties/Langs/Lang.resx | 3 + .../Img/LeftMainContent/ListView_16x.png | Bin 0 -> 167 bytes .../UserControl/Main/LeftMainContent.xaml | 5 + .../UserControl/Styles/ListViewDemoCtl.xaml | 18 +++ .../Styles/ListViewDemoCtl.xaml.cs | 10 ++ 13 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 HandyControl/Themes/Styles/ListView.xaml create mode 100644 HandyControlDemo/Resources/Img/LeftMainContent/ListView_16x.png create mode 100644 HandyControlDemo/UserControl/Styles/ListViewDemoCtl.xaml create mode 100644 HandyControlDemo/UserControl/Styles/ListViewDemoCtl.xaml.cs diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj index fca70629..18af5481 100644 --- a/HandyControl/HandyControl.csproj +++ b/HandyControl/HandyControl.csproj @@ -439,6 +439,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/HandyControl/Themes/Styles/ListView.xaml b/HandyControl/Themes/Styles/ListView.xaml new file mode 100644 index 00000000..613f3d39 --- /dev/null +++ b/HandyControl/Themes/Styles/ListView.xaml @@ -0,0 +1,115 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/HandyControl/Themes/Styles/Style.xaml b/HandyControl/Themes/Styles/Style.xaml index cb06d590..59c5ecb1 100644 --- a/HandyControl/Themes/Styles/Style.xaml +++ b/HandyControl/Themes/Styles/Style.xaml @@ -41,6 +41,7 @@ + \ No newline at end of file diff --git a/HandyControlDemo/Data/MessageToken.cs b/HandyControlDemo/Data/MessageToken.cs index 25063999..5e8f56e9 100644 --- a/HandyControlDemo/Data/MessageToken.cs +++ b/HandyControlDemo/Data/MessageToken.cs @@ -96,6 +96,8 @@ public static readonly string GroupBoxDemoCtl = nameof(GroupBoxDemoCtl); + public static readonly string ListViewDemoCtl = nameof(ListViewDemoCtl); + public static readonly string CommonWindow = nameof(CommonWindow); public static readonly string CustomNonClientAreaWindow = nameof(CustomNonClientAreaWindow); diff --git a/HandyControlDemo/Data/MessageToken.tt b/HandyControlDemo/Data/MessageToken.tt index e8167844..627e57af 100644 --- a/HandyControlDemo/Data/MessageToken.tt +++ b/HandyControlDemo/Data/MessageToken.tt @@ -53,7 +53,8 @@ var styleList = new List "NaiveScrollViewerDemoCtl", "BrushDemoCtl", "SliderDemoCtl", - "GroupBoxDemoCtl" + "GroupBoxDemoCtl", + "ListViewDemoCtl" }; var windowList = new List { diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj index 07803abd..a55ee287 100644 --- a/HandyControlDemo/HandyControlDemo.csproj +++ b/HandyControlDemo/HandyControlDemo.csproj @@ -186,6 +186,9 @@ GroupBoxDemoCtl.xaml + + ListViewDemoCtl.xaml + NaiveComboBoxDemoCtl.xaml @@ -444,6 +447,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -564,6 +571,7 @@ TextTemplatingFileGenerator MessageToken.cs + diff --git a/HandyControlDemo/Properties/Langs/Lang.Designer.cs b/HandyControlDemo/Properties/Langs/Lang.Designer.cs index 68444cd4..4bdac577 100644 --- a/HandyControlDemo/Properties/Langs/Lang.Designer.cs +++ b/HandyControlDemo/Properties/Langs/Lang.Designer.cs @@ -501,6 +501,15 @@ namespace HandyControlDemo.Properties.Langs { } } + /// + /// 查找类似 列表视图 的本地化字符串。 + /// + public static string ListView { + get { + return ResourceManager.GetString("ListView", resourceCulture); + } + } + /// /// 查找类似 加载条 的本地化字符串。 /// diff --git a/HandyControlDemo/Properties/Langs/Lang.en.resx b/HandyControlDemo/Properties/Langs/Lang.en.resx index f8dd5ef9..107eea8b 100644 --- a/HandyControlDemo/Properties/Langs/Lang.en.resx +++ b/HandyControlDemo/Properties/Langs/Lang.en.resx @@ -408,4 +408,7 @@ GroupBox + + ListView + \ No newline at end of file diff --git a/HandyControlDemo/Properties/Langs/Lang.resx b/HandyControlDemo/Properties/Langs/Lang.resx index 1940e084..98d96dcc 100644 --- a/HandyControlDemo/Properties/Langs/Lang.resx +++ b/HandyControlDemo/Properties/Langs/Lang.resx @@ -388,4 +388,7 @@ 分组框 + + 列表视图 + \ No newline at end of file diff --git a/HandyControlDemo/Resources/Img/LeftMainContent/ListView_16x.png b/HandyControlDemo/Resources/Img/LeftMainContent/ListView_16x.png new file mode 100644 index 0000000000000000000000000000000000000000..acb4e7476367aba79764fa5cfc4741b14db56399 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP%zTd z#WAEJ?(HQ*t_B01)`#IIKW + + + + + diff --git a/HandyControlDemo/UserControl/Styles/ListViewDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/ListViewDemoCtl.xaml new file mode 100644 index 00000000..02ef496a --- /dev/null +++ b/HandyControlDemo/UserControl/Styles/ListViewDemoCtl.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + diff --git a/HandyControlDemo/UserControl/Styles/ListViewDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Styles/ListViewDemoCtl.xaml.cs new file mode 100644 index 00000000..3aed76aa --- /dev/null +++ b/HandyControlDemo/UserControl/Styles/ListViewDemoCtl.xaml.cs @@ -0,0 +1,10 @@ +namespace HandyControlDemo.UserControl +{ + public partial class ListViewDemoCtl + { + public ListViewDemoCtl() + { + InitializeComponent(); + } + } +}