diff --git a/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj b/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj
index dbbb46a4..6181daab 100644
--- a/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj
+++ b/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj
@@ -273,6 +273,9 @@
UserControl\Styles\FrameDemoCtl.xaml
+
+ UserControl\Styles\GeometryDemoCtl.xaml
+
UserControl\Styles\GroupBoxDemoCtl.xaml
@@ -706,6 +709,10 @@
UserControl\Styles\FrameDemoCtl.xaml.cs
FrameDemoCtl.xaml
+
+ UserControl\Styles\GeometryDemoCtl.xaml.cs
+ GeometryDemoCtl.xaml
+
UserControl\Styles\GroupBoxDemoCtl.xaml.cs
GroupBoxDemoCtl.xaml
diff --git a/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json b/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json
index 3f16bf4a..c1e8e21e 100644
--- a/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json
+++ b/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json
@@ -32,7 +32,8 @@
[ "Border", "BorderDemoCtl", "BorderElement_16x", "" ],
[ "Label", "LabelDemoCtl", "Label_16x", "" ],
[ "Frame", "FrameDemoCtl", "frame_16xLG", "1" ],
- [ "Window", "NativeWindowDemoCtl", "WindowsForm_16x", "1" ]
+ [ "Window", "NativeWindowDemoCtl", "WindowsForm_16x", "1" ],
+ [ "Geometry", "GeometryDemoCtl", "Path_16x", "1" ]
]
},
{
diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/GeometryItemModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/GeometryItemModel.cs
new file mode 100644
index 00000000..dca49b44
--- /dev/null
+++ b/src/Shared/HandyControlDemo_Shared/Data/Model/GeometryItemModel.cs
@@ -0,0 +1,13 @@
+using System.Windows.Media;
+
+namespace HandyControlDemo.Data
+{
+ public class GeometryItemModel
+ {
+ public Geometry Data { get; set; }
+
+ public string Key { get; set; }
+
+ public bool Line { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems
index 0e17de7f..1ae0db8c 100644
--- a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems
+++ b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems
@@ -19,6 +19,7 @@
+
@@ -45,6 +46,9 @@
ChatBox.xaml
+
+ GeometryItem.xaml
+
InteractiveDialog.xaml
@@ -316,6 +320,9 @@
FrameDemoCtl.xaml
+
+ GeometryDemoCtl.xaml
+
GroupBoxDemoCtl.xaml
@@ -503,6 +510,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -863,6 +874,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs
index 41e738c9..7f1a0b46 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs
@@ -671,7 +671,15 @@ namespace HandyControlDemo.Properties.Langs {
return ResourceManager.GetString("Frame", resourceCulture);
}
}
-
+
+ public static string Geometry
+ {
+ get
+ {
+ return ResourceManager.GetString("Geometry", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Gif图片 的本地化字符串。
///
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx
index c732de69..090e5b57 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx
@@ -756,4 +756,7 @@
ImageSelector
+
+ Geometry
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx
index 55d816c1..2edb2676 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx
@@ -756,4 +756,7 @@
ImageSelector
+
+ Geometry
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx
index c8d40632..57a16fd2 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx
@@ -756,4 +756,7 @@
ImageSelector
+
+ Geometry
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ko-KR.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ko-KR.resx
index 145d2134..065145dc 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ko-KR.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ko-KR.resx
@@ -756,4 +756,7 @@
ImageSelector
+
+ Geometry
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.pt-BR.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.pt-BR.resx
index 405807a2..ac7835dc 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.pt-BR.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.pt-BR.resx
@@ -1,76 +1,96 @@
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -89,13 +109,13 @@
text/microsoft-resx
- 1.3
+ 2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Sobre
@@ -736,4 +756,7 @@
Janela
+
+ Geometry
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx
index 1035e112..34a270a9 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx
@@ -756,4 +756,7 @@
图片选择器
+
+ 几何形状
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ru.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ru.resx
index c732de69..090e5b57 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ru.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ru.resx
@@ -756,4 +756,7 @@
ImageSelector
+
+ Geometry
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.tr.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.tr.resx
index 988e40aa..b641cf03 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.tr.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.tr.resx
@@ -756,4 +756,7 @@
ImageSelector
+
+ Geometry
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs b/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs
index 9a7df866..93ca4c9c 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs
@@ -105,6 +105,7 @@ namespace HandyControlDemo.Properties.Langs
OnPropertyChanged(nameof(FlowDocumentReader));
OnPropertyChanged(nameof(FlowDocumentScrollViewer));
OnPropertyChanged(nameof(Frame));
+ OnPropertyChanged(nameof(Geometry));
OnPropertyChanged(nameof(GifImage));
OnPropertyChanged(nameof(GotoTop));
OnPropertyChanged(nameof(Gravatar));
@@ -592,10 +593,15 @@ namespace HandyControlDemo.Properties.Langs
///
public string Frame => Lang.Frame;
+ ///
+ /// 查找类似 几何形状 的本地化字符串。
+ ///
+ public string Geometry => Lang.Geometry;
+
///
/// 查找类似 Gif图片 的本地化字符串。
///
- public string GifImage => Lang.GifImage;
+ public string GifImage => Lang.GifImage;
///
/// 查找类似 回到顶部 的本地化字符串。
@@ -1666,6 +1672,11 @@ namespace HandyControlDemo.Properties.Langs
///
public static string Frame = nameof(Frame);
+ ///
+ /// 查找类似 几何形状 的本地化字符串。
+ ///
+ public static string Geometry = nameof(Geometry);
+
///
/// 查找类似 Gif图片 的本地化字符串。
///
diff --git a/src/Shared/HandyControlDemo_Shared/Resources/Themes/Styles/Style.xaml b/src/Shared/HandyControlDemo_Shared/Resources/Themes/Styles/Style.xaml
index d17b720f..c526ea38 100644
--- a/src/Shared/HandyControlDemo_Shared/Resources/Themes/Styles/Style.xaml
+++ b/src/Shared/HandyControlDemo_Shared/Resources/Themes/Styles/Style.xaml
@@ -187,4 +187,20 @@
+
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml
new file mode 100644
index 00000000..0e7eb744
--- /dev/null
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs
new file mode 100644
index 00000000..63eb3343
--- /dev/null
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs
@@ -0,0 +1,19 @@
+using System.Windows;
+using HandyControlDemo.Data;
+
+namespace HandyControlDemo.UserControl
+{
+ public partial class GeometryItem
+ {
+ public GeometryItem() => InitializeComponent();
+
+ public static readonly DependencyProperty InfoProperty = DependencyProperty.Register(
+ "Info", typeof(GeometryItemModel), typeof(GeometryItem), new PropertyMetadata(default(GeometryItemModel)));
+
+ public GeometryItemModel Info
+ {
+ get => (GeometryItemModel) GetValue(InfoProperty);
+ set => SetValue(InfoProperty, value);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/GeometryDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/GeometryDemoCtl.xaml
new file mode 100644
index 00000000..28168ea8
--- /dev/null
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/GeometryDemoCtl.xaml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/GeometryDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/GeometryDemoCtl.xaml.cs
new file mode 100644
index 00000000..a5db3370
--- /dev/null
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/GeometryDemoCtl.xaml.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Windows.Media;
+using HandyControl.Themes;
+using HandyControl.Tools;
+using HandyControlDemo.Data;
+
+namespace HandyControlDemo.UserControl
+{
+ public partial class GeometryDemoCtl
+ {
+ private readonly HashSet _lineSet = new HashSet
+ {
+ "CheckedGeometry"
+ };
+
+ public ObservableCollection GeometryItems { get; set; } =
+ new ObservableCollection();
+
+ public GeometryDemoCtl()
+ {
+ InitializeComponent();
+ GenerateGeometries();
+ }
+
+ public void GenerateGeometries()
+ {
+ var uri = new Uri("pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml", UriKind.Absolute);
+ var dic = SharedResourceDictionary.SharedDictionaries[uri];
+ var keys = dic.Keys.OfType().OrderBy(item => item);
+
+ foreach (var key in keys)
+ {
+ var data = ResourceHelper.GetResource(key);
+ GeometryItems.Add(new GeometryItemModel
+ {
+ Key = key,
+ Data = data,
+ Line = _lineSet.Contains(key)
+ });
+ }
+ }
+ }
+}