This commit is contained in:
Mahdi Hosseini committed 2020-06-27 15:29:14 +04:30
1 parent 4bdaa5676e
commit 2d9b6bb8ad
17 files changed
+178 -63

No files matched your search

@@ -412,6 +412,9 @@
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\MainMenuControl_16x.png">
<Link>Resources\Img\LeftMainContent\MainMenuControl_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Geometry_16x.png">
<Link>Resources\Img\LeftMainContent\Geometry_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
<Link>Resources\fabric-icons.ttf</Link>
</Resource>
@@ -411,6 +411,9 @@
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\MainMenuControl_16x.png">
<Link>Resources\Img\LeftMainContent\MainMenuControl_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Geometry_16x.png">
<Link>Resources\Img\LeftMainContent\Geometry_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
<Link>Resources\fabric-icons.ttf</Link>
@@ -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", "Geometry_16x", "1" ]
]
},
{
@@ -315,6 +315,9 @@
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\FrameDemoCtl.xaml.cs">
<DependentUpon>FrameDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\GeometryDemoCtl.xaml.cs">
<DependentUpon>GeometryDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\GroupBoxDemoCtl.xaml.cs">
<DependentUpon>GroupBoxDemoCtl.xaml</DependentUpon>
@@ -862,6 +865,10 @@
<Page Include="$(MSBuildThisFileDirectory)UserControl\Styles\FrameDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Styles\GeometryDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Styles\GroupBoxDemoCtl.xaml">
<SubType>Designer</SubType>
@@ -671,7 +671,15 @@ namespace HandyControlDemo.Properties.Langs {
return ResourceManager.GetString("Frame", resourceCulture);
}
}
public static string Geometry
{
get
{
return ResourceManager.GetString("Geometry", resourceCulture);
}
}
/// <summary>
/// 查找类似 Gif图片 的本地化字符串。
/// </summary>
@@ -756,4 +756,7 @@
<data name="ImageSelector" xml:space="preserve">
<value>ImageSelector</value>
</data>
<data name="Geometry" xml:space="preserve">
<value>Geometry</value>
</data>
</root>
@@ -756,4 +756,7 @@
<data name="ImageSelector" xml:space="preserve">
<value>ImageSelector</value>
</data>
<data name="Geometry" xml:space="preserve">
<value>Geometry</value>
</data>
</root>
@@ -756,4 +756,7 @@
<data name="ImageSelector" xml:space="preserve">
<value>ImageSelector</value>
</data>
<data name="Geometry" xml:space="preserve">
<value>Geometry</value>
</data>
</root>
@@ -756,4 +756,7 @@
<data name="ImageSelector" xml:space="preserve">
<value>ImageSelector</value>
</data>
<data name="Geometry" xml:space="preserve">
<value>Geometry</value>
</data>
</root>
@@ -1,76 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
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.
-->
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.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@@ -89,13 +109,13 @@
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="About" xml:space="preserve">
<value>Sobre</value>
@@ -736,4 +756,7 @@
<data name="Window" xml:space="preserve">
<value>Janela</value>
</data>
<data name="Geometry" xml:space="preserve">
<value>Geometry</value>
</data>
</root>
@@ -756,4 +756,7 @@
<data name="ImageSelector" xml:space="preserve">
<value>图片选择器</value>
</data>
<data name="Geometry" xml:space="preserve">
<value>Geometry</value>
</data>
</root>
@@ -756,4 +756,7 @@
<data name="ImageSelector" xml:space="preserve">
<value>ImageSelector</value>
</data>
<data name="Geometry" xml:space="preserve">
<value>Geometry</value>
</data>
</root>
@@ -756,4 +756,7 @@
<data name="ImageSelector" xml:space="preserve">
<value>ImageSelector</value>
</data>
<data name="Geometry" xml:space="preserve">
<value>Geometry</value>
</data>
</root>
@@ -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,11 @@ namespace HandyControlDemo.Properties.Langs
/// </summary>
public string Frame => Lang.Frame;
public string Geometry => Lang.Geometry;
/// <summary>
/// 查找类似 Gif图片 的本地化字符串。
/// </summary>
public string GifImage => Lang.GifImage;
public string GifImage => Lang.GifImage;
/// <summary>
/// 查找类似 回到顶部 的本地化字符串。
@@ -1666,6 +1668,8 @@ namespace HandyControlDemo.Properties.Langs
/// </summary>
public static string Frame = nameof(Frame);
public static string Geometry = nameof(Geometry);
/// <summary>
/// 查找类似 Gif图片 的本地化字符串。
/// </summary>
Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

@@ -0,0 +1,11 @@
<UserControl x:Class="HandyControlDemo.UserControl.GeometryDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<WrapPanel Name="panel"/>
</hc:TransitioningContentControl>
</UserControl>
@@ -0,0 +1,34 @@
using HandyControl.Data;
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
namespace HandyControlDemo.UserControl
{
public partial class GeometryDemoCtl
{
public GeometryDemoCtl()
{
InitializeComponent();
GenerateGeometries();
}
public void GenerateGeometries()
{
ResourceDictionary dictionary = new ResourceDictionary();
dictionary.Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml", UriKind.Absolute);
foreach (var item in dictionary.Keys)
{
StackPanel stack = new StackPanel { Margin = new Thickness(10) };
TextBlock text = new TextBlock { Text = item.ToString(), HorizontalAlignment = HorizontalAlignment.Stretch };
Path path = new Path { Width = 26, Height = 26, Data = TryFindResource(item.ToString()) as Geometry, Fill = TryFindResource(ResourceToken.PrimaryTextBrush) as Brush };
stack.Children.Add(path);
stack.Children.Add(text);
panel.Children.Add(stack);
}
}
}
}