From f1dca283f84231cd3c09e426fa0a1810da89c42a Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sat, 14 Dec 2019 01:33:32 +0800 Subject: [PATCH 01/11] add ColorComplementEffect --- .../HandyControl_Core_30.csproj | 3 ++ .../HandyControl_Net_40.csproj | 3 ++ .../HandyControl_Net_GE45.csproj | 3 ++ .../HandyControl_Shared.projitems | 1 + .../Media/Effects/ColorComplementEffect.cs | 34 ++++++++++++++++++ .../Properties/AssemblyInfo.cs | 1 + .../Effects/ColorComplementEffect.ps | Bin 0 -> 220 bytes 7 files changed, 45 insertions(+) create mode 100644 src/Shared/HandyControl_Shared/Media/Effects/ColorComplementEffect.cs create mode 100644 src/Shared/HandyControl_Shared/Resources/Effects/ColorComplementEffect.ps diff --git a/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj b/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj index 07314a19..ce527ed8 100644 --- a/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj +++ b/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj @@ -56,5 +56,8 @@ Resources\dropper.cur + + Resources\Effects\ColorComplementEffect.ps + \ No newline at end of file diff --git a/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj b/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj index 28017834..3017e107 100644 --- a/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj +++ b/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj @@ -108,6 +108,9 @@ Resources\dropper.cur + + Resources\Effects\ColorComplementEffect.ps + diff --git a/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj b/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj index 49bc677b..5c685b76 100644 --- a/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj +++ b/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj @@ -179,6 +179,9 @@ Resources\dropper.cur + + Resources\Effects\ColorComplementEffect.ps + diff --git a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems index b01bf9b2..f5f1e48d 100644 --- a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems +++ b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems @@ -58,6 +58,7 @@ + diff --git a/src/Shared/HandyControl_Shared/Media/Effects/ColorComplementEffect.cs b/src/Shared/HandyControl_Shared/Media/Effects/ColorComplementEffect.cs new file mode 100644 index 00000000..bae72b0d --- /dev/null +++ b/src/Shared/HandyControl_Shared/Media/Effects/ColorComplementEffect.cs @@ -0,0 +1,34 @@ +using System; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Effects; + +namespace HandyControl.Media.Effects +{ + public class ColorComplementEffect : ShaderEffect + { + public static readonly DependencyProperty InputProperty = RegisterPixelShaderSamplerProperty("Input", typeof(ColorComplementEffect), 0); + + private static readonly PixelShader Shader; + + static ColorComplementEffect() + { + Shader = new PixelShader + { + UriSource = new Uri("pack://application:,,,/HandyControl;component/Resources/Effects/ColorComplementEffect.ps") + }; + } + + public ColorComplementEffect() + { + PixelShader = Shader; + UpdateShaderValue(InputProperty); + } + + public Brush Input + { + get => (Brush)GetValue(InputProperty); + set => SetValue(InputProperty, value); + } + } +} diff --git a/src/Shared/HandyControl_Shared/Properties/AssemblyInfo.cs b/src/Shared/HandyControl_Shared/Properties/AssemblyInfo.cs index 65c79a43..8b80dbb4 100644 --- a/src/Shared/HandyControl_Shared/Properties/AssemblyInfo.cs +++ b/src/Shared/HandyControl_Shared/Properties/AssemblyInfo.cs @@ -22,6 +22,7 @@ using System.Runtime.InteropServices; [assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Expression.Shapes")] [assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Expression.Media")] [assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Media.Animation")] +[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Media.Effects")] [assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Data")] [assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Properties.Langs")] [assembly: XmlnsPrefix("https://handyorg.github.io/handycontrol", "hc")] \ No newline at end of file diff --git a/src/Shared/HandyControl_Shared/Resources/Effects/ColorComplementEffect.ps b/src/Shared/HandyControl_Shared/Resources/Effects/ColorComplementEffect.ps new file mode 100644 index 0000000000000000000000000000000000000000..bfeb1a745ae543475ec9616e0dd98d471b0db684 GIT binary patch literal 220 zcmZQz`v3pme`N;e5Jx8&1_p+3AZ7rHF#;(Np8?1S08$1(%nar-F*pEe5Xj6e$jMC3 zEb+`MC@o=Fy_$uA2dEqbA)uf*-YDLH!8bFxD8D#Atwcd1NK?VXC)h_JI3qD7wMfA^ zKer$=2gtD0Gcwn+G&RyQHZU?`kO#T|XhH+f#tl&R1O^WN1x{cm@B_u4Y+&GcvH++E a=p=R!zmb9Ae*@57CZIYHzv2IX1_l5Z Date: Sat, 14 Dec 2019 13:47:05 +0800 Subject: [PATCH 02/11] add GrayScaleEffect --- README.md | 8 ++- .../HandyControlDemo_Core30.csproj | 3 ++ .../HandyControl_Core_30.csproj | 5 ++ .../HandyControlDemo_Net_40.csproj | 3 ++ .../HandyControl_Net_40.csproj | 5 ++ .../HandyControlDemo_Net_GE45.csproj | 3 ++ .../HandyControl_Net_GE45.csproj | 5 ++ .../Data/DemoInfo.json | 3 +- .../HandyControlDemo_Shared.projitems | 7 +++ .../Properties/Langs/Lang.Designer.cs | 9 ++++ .../Properties/Langs/Lang.en.resx | 3 ++ .../Properties/Langs/Lang.fa.resx | 3 ++ .../Properties/Langs/Lang.fr.resx | 3 ++ .../Properties/Langs/Lang.resx | 3 ++ .../Img/LeftMainContent/Effects_16x.png | Bin 0 -> 369 bytes .../UserControl/Tools/EffectsDemoCtl.xaml | 26 ++++++++++ .../UserControl/Tools/EffectsDemoCtl.xaml.cs | 10 ++++ .../HandyControl_Shared.projitems | 1 + .../Media/Effects/ColorComplementEffect.cs | 1 + .../Media/Effects/GrayScaleEffect.cs | 46 ++++++++++++++++++ .../Resources/Effects/GrayScaleEffect.ps | Bin 0 -> 384 bytes 21 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 src/Shared/HandyControlDemo_Shared/Resources/Img/LeftMainContent/Effects_16x.png create mode 100644 src/Shared/HandyControlDemo_Shared/UserControl/Tools/EffectsDemoCtl.xaml create mode 100644 src/Shared/HandyControlDemo_Shared/UserControl/Tools/EffectsDemoCtl.xaml.cs create mode 100644 src/Shared/HandyControl_Shared/Media/Effects/GrayScaleEffect.cs create mode 100644 src/Shared/HandyControl_Shared/Resources/Effects/GrayScaleEffect.ps diff --git a/README.md b/README.md index 62aca62e..8b8986d6 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,10 @@ Step 4:enjoy coding ## Latest examples +### Effects + +![Effects](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Effects.png) + ### RelativePanel ![RelativePanel](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/RelativePanel.png) @@ -107,12 +111,12 @@ Step 4:enjoy coding ![Divider](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Divider.png) +## History publication + ### GeometryAnimation ![GeometryAnimation](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/GeometryAnimation.gif) -## History publication - ### SplitButton ![SplitButton](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/SplitButton.png) diff --git a/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj b/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj index bd93971a..b343a399 100644 --- a/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj +++ b/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj @@ -451,6 +451,9 @@ Resources\Img\LeftMainContent\TransformRelative_16x.png + + Resources\Img\LeftMainContent\Effects_16x.png + diff --git a/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj b/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj index ce527ed8..97e75628 100644 --- a/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj +++ b/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj @@ -56,8 +56,13 @@ Resources\dropper.cur + + Resources\Effects\ColorComplementEffect.ps + + Resources\Effects\GrayScaleEffect.ps + \ No newline at end of file diff --git a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj index 65e72972..dad16ae2 100644 --- a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj +++ b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj @@ -430,6 +430,9 @@ TextTemplatingFileGenerator MessageToken.cs + + Resources\Img\LeftMainContent\Effects_16x.png + Resources\Img\LeftMainContent\TransformRelative_16x.png diff --git a/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj b/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj index 3017e107..f6d5903f 100644 --- a/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj +++ b/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj @@ -108,9 +108,14 @@ Resources\dropper.cur + + Resources\Effects\ColorComplementEffect.ps + + Resources\Effects\GrayScaleEffect.ps + diff --git a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj index 8a6b97f4..3577548d 100644 --- a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj +++ b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj @@ -496,6 +496,9 @@ TextTemplatingFileGenerator MessageToken.cs + + Resources\Img\LeftMainContent\Effects_16x.png + Resources\Img\LeftMainContent\TransformRelative_16x.png diff --git a/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj b/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj index 5c685b76..8ad765a1 100644 --- a/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj +++ b/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj @@ -179,9 +179,14 @@ Resources\dropper.cur + + Resources\Effects\ColorComplementEffect.ps + + Resources\Effects\GrayScaleEffect.ps + diff --git a/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json b/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json index 92439c37..18f69028 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json +++ b/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json @@ -101,7 +101,8 @@ "title": "Tools", "demoItemList": [ [ "HatchBrushGenerator", "HatchBrushGeneratorDemoCtl", "DataGenerator_16x", "" ], - [ "Morphing Animation", "GeometryAnimationDemoCtl", "Animation_16x", "1" ] + [ "Morphing Animation", "GeometryAnimationDemoCtl", "Animation_16x", "" ], + [ "Effects", "EffectsDemoCtl", "Effects_16x", "1" ] ] } ] \ 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 4fe569a5..c1fd7462 100644 --- a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems +++ b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems @@ -347,6 +347,9 @@ TreeViewDemoCtl.xaml + + EffectsDemoCtl.xaml + GeometryAnimationDemoCtl.xaml @@ -863,6 +866,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 0aa76e77..0d469540 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs @@ -519,6 +519,15 @@ namespace HandyControlDemo.Properties.Langs { } } + /// + /// 查找类似 效果 的本地化字符串。 + /// + public static string Effects { + get { + return ResourceManager.GetString("Effects", resourceCulture); + } + } + /// /// 查找类似 邮箱 的本地化字符串。 /// diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx index 95647270..561df37e 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx @@ -690,4 +690,7 @@ Drawer + + Effects + \ 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 f7c92746..b0c64b31 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx @@ -690,4 +690,7 @@ Drawer + + Effects + \ 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 cd855df0..17878747 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx @@ -690,4 +690,7 @@ Drawer + + Effects + \ 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 813ca2e5..ca3e4807 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx @@ -690,4 +690,7 @@ 抽屉 + + 效果 + \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Resources/Img/LeftMainContent/Effects_16x.png b/src/Shared/HandyControlDemo_Shared/Resources/Img/LeftMainContent/Effects_16x.png new file mode 100644 index 0000000000000000000000000000000000000000..67d9e6142c4d2cfa4811ea3c4f3f65cb2394c687 GIT binary patch literal 369 zcmV-%0gnEOP)pGBS}O-RCr$1lCO?~KoEy{gg!zap^wnuNwByIJRWrld%=^OM4rG? zjjF*Hk66J!xwqeBm*%zxbK*!w%JTb_Hh_(7zXb4=Y>uH z5OP2P0)8N{*#Sb3*#l?f1hg;oS0^x?;OrLbFWNr~aCXSh%=3H+{?+#b?i8jaD+S}f P00000NkvXXu0mjf;3T4< literal 0 HcmV?d00001 diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Tools/EffectsDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Tools/EffectsDemoCtl.xaml new file mode 100644 index 00000000..312cec54 --- /dev/null +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Tools/EffectsDemoCtl.xaml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Tools/EffectsDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Tools/EffectsDemoCtl.xaml.cs new file mode 100644 index 00000000..7f56b93f --- /dev/null +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Tools/EffectsDemoCtl.xaml.cs @@ -0,0 +1,10 @@ +namespace HandyControlDemo.UserControl +{ + public partial class EffectsDemoCtl + { + public EffectsDemoCtl() + { + InitializeComponent(); + } + } +} diff --git a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems index f5f1e48d..e8fea193 100644 --- a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems +++ b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems @@ -59,6 +59,7 @@ + diff --git a/src/Shared/HandyControl_Shared/Media/Effects/ColorComplementEffect.cs b/src/Shared/HandyControl_Shared/Media/Effects/ColorComplementEffect.cs index bae72b0d..f9871671 100644 --- a/src/Shared/HandyControl_Shared/Media/Effects/ColorComplementEffect.cs +++ b/src/Shared/HandyControl_Shared/Media/Effects/ColorComplementEffect.cs @@ -22,6 +22,7 @@ namespace HandyControl.Media.Effects public ColorComplementEffect() { PixelShader = Shader; + UpdateShaderValue(InputProperty); } diff --git a/src/Shared/HandyControl_Shared/Media/Effects/GrayScaleEffect.cs b/src/Shared/HandyControl_Shared/Media/Effects/GrayScaleEffect.cs new file mode 100644 index 00000000..2a972ea9 --- /dev/null +++ b/src/Shared/HandyControl_Shared/Media/Effects/GrayScaleEffect.cs @@ -0,0 +1,46 @@ +using System; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Effects; +using HandyControl.Data; + +namespace HandyControl.Media.Effects +{ + public class GrayScaleEffect : ShaderEffect + { + public static readonly DependencyProperty InputProperty = RegisterPixelShaderSamplerProperty("Input", typeof(GrayScaleEffect), 0); + + private static readonly PixelShader Shader; + + static GrayScaleEffect() + { + Shader = new PixelShader + { + UriSource = new Uri("pack://application:,,,/HandyControl;component/Resources/Effects/GrayScaleEffect.ps") + }; + } + + public GrayScaleEffect() + { + PixelShader = Shader; + + UpdateShaderValue(InputProperty); + UpdateShaderValue(ScaleProperty); + } + + public Brush Input + { + get => (Brush)GetValue(InputProperty); + set => SetValue(InputProperty, value); + } + + public static readonly DependencyProperty ScaleProperty = DependencyProperty.Register( + "Scale", typeof(double), typeof(GrayScaleEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0))); + + public double Scale + { + get => (double) GetValue(ScaleProperty); + set => SetValue(ScaleProperty, value); + } + } +} diff --git a/src/Shared/HandyControl_Shared/Resources/Effects/GrayScaleEffect.ps b/src/Shared/HandyControl_Shared/Resources/Effects/GrayScaleEffect.ps new file mode 100644 index 0000000000000000000000000000000000000000..3b4ab0a9640df2e608132d8f95dbf5c708cacf3f GIT binary patch literal 384 zcmYjMu};G<5Pfl5k)cw40EvvSM3pOqx`1dIKxzkQJ6Ba&gr$^3P1qPB@dJEwn*>{F8=GR1+EbhnW0KVv;CKxP-2YfO-&^wL_EEuhA=(f(|nOK3Q zc3GlgRXn|C9|h{Vi$3#qwU)>0WJ}$?cB*IjO0EW&sd%5}>1z>QzFdWm)A=-S@vALaF}_0%9+<)fcuPh8~eViv;8=S(~JTB E0HJn62><{9 literal 0 HcmV?d00001 From e2e1c6a19358d9aeefead2ebceb483262182db4d Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sat, 14 Dec 2019 14:51:26 +0800 Subject: [PATCH 03/11] fixed #265 --- .../HandyControlDemo_Shared/ViewModel/Basic/ChatBoxViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Shared/HandyControlDemo_Shared/ViewModel/Basic/ChatBoxViewModel.cs b/src/Shared/HandyControlDemo_Shared/ViewModel/Basic/ChatBoxViewModel.cs index 65c31f5f..ea624f86 100644 --- a/src/Shared/HandyControlDemo_Shared/ViewModel/Basic/ChatBoxViewModel.cs +++ b/src/Shared/HandyControlDemo_Shared/ViewModel/Basic/ChatBoxViewModel.cs @@ -133,7 +133,7 @@ namespace HandyControlDemo.ViewModel } } - var cachePath = $"{AudioCachePath}\\{Guid.NewGuid().ToString()}"; + var cachePath = $"\"{AudioCachePath}\\{Guid.NewGuid().ToString()}\""; ExternDllHelper.MciSendString("stop movie", "", 0, 0); ExternDllHelper.MciSendString($"save movie {cachePath}", "", 0, 0); ExternDllHelper.MciSendString("close movie", "", 0, 0); From 6a20b67f505d6a210deac12dea070b38cfbe2675 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sat, 14 Dec 2019 15:47:06 +0800 Subject: [PATCH 04/11] modified DataGrid style --- .../HandyControl_Core_30/Themes/Styles/DataGrid.xaml | 8 +------- .../HandyControl_Net_40/Themes/Styles/DataGrid.xaml | 8 +------- .../HandyControl_Net_GE45/Themes/Styles/DataGrid.xaml | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/Core_30/HandyControl_Core_30/Themes/Styles/DataGrid.xaml b/src/Core_30/HandyControl_Core_30/Themes/Styles/DataGrid.xaml index 0381d657..f0e986a1 100644 --- a/src/Core_30/HandyControl_Core_30/Themes/Styles/DataGrid.xaml +++ b/src/Core_30/HandyControl_Core_30/Themes/Styles/DataGrid.xaml @@ -297,13 +297,7 @@ - - - - - - - + diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/DataGrid.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/DataGrid.xaml index a93c8b55..8137cf91 100644 --- a/src/Net_40/HandyControl_Net_40/Themes/Styles/DataGrid.xaml +++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/DataGrid.xaml @@ -298,13 +298,7 @@ - - - - - - - + diff --git a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/DataGrid.xaml b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/DataGrid.xaml index 41eecff7..93dade9b 100644 --- a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/DataGrid.xaml +++ b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/DataGrid.xaml @@ -297,13 +297,7 @@ - - - - - - - + From 3b79db2b4bc635815403519303f14beb822a624c Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sat, 14 Dec 2019 16:01:54 +0800 Subject: [PATCH 05/11] fixed #254 --- .../Themes/Styles/Base/TreeViewBaseStyle.xaml | 3 ++- .../Themes/Styles/Base/TreeViewBaseStyle.xaml | 3 ++- .../Themes/Styles/Base/TreeViewBaseStyle.xaml | 3 ++- .../Themes/Styles/Base/ExpanderBaseStyle.xaml | 2 +- .../Themes/Styles/Base/ListBoxBaseStyle.xaml | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml index 7cd8f6c3..8050e2b6 100644 --- a/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml +++ b/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml @@ -3,6 +3,7 @@ xmlns:controls="clr-namespace:HandyControl.Controls"> + @@ -47,7 +48,7 @@ - + diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml index 9351e44f..af4a3db6 100644 --- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml +++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml @@ -3,6 +3,7 @@ xmlns:controls="clr-namespace:HandyControl.Controls"> + @@ -47,7 +48,7 @@ - + diff --git a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Base/TreeViewBaseStyle.xaml index 7cd8f6c3..8050e2b6 100644 --- a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Base/TreeViewBaseStyle.xaml +++ b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Base/TreeViewBaseStyle.xaml @@ -3,6 +3,7 @@ xmlns:controls="clr-namespace:HandyControl.Controls"> + @@ -47,7 +48,7 @@ - + diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml index 211affc8..c3dd9d83 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml @@ -14,7 +14,7 @@ - + diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml index 1f6b1131..cc7ffcb3 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml @@ -4,6 +4,7 @@ + @@ -11,7 +12,7 @@ - + From 7289b3b65bb59369f115824eaf6b21cdde0ba65d Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sat, 14 Dec 2019 16:58:05 +0800 Subject: [PATCH 06/11] Update ChatBoxViewModel.cs --- .../ViewModel/Basic/ChatBoxViewModel.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Shared/HandyControlDemo_Shared/ViewModel/Basic/ChatBoxViewModel.cs b/src/Shared/HandyControlDemo_Shared/ViewModel/Basic/ChatBoxViewModel.cs index ea624f86..7fc48de2 100644 --- a/src/Shared/HandyControlDemo_Shared/ViewModel/Basic/ChatBoxViewModel.cs +++ b/src/Shared/HandyControlDemo_Shared/ViewModel/Basic/ChatBoxViewModel.cs @@ -133,9 +133,10 @@ namespace HandyControlDemo.ViewModel } } - var cachePath = $"\"{AudioCachePath}\\{Guid.NewGuid().ToString()}\""; + var cachePath = $"{AudioCachePath}\\{Guid.NewGuid().ToString()}"; + var cachePathWithQuotes = $"\"{cachePath}\""; ExternDllHelper.MciSendString("stop movie", "", 0, 0); - ExternDllHelper.MciSendString($"save movie {cachePath}", "", 0, 0); + ExternDllHelper.MciSendString($"save movie {cachePathWithQuotes}", "", 0, 0); ExternDllHelper.MciSendString("close movie", "", 0, 0); _stopwatch.Stop(); From b0ff7e5b002ca9354ff324736e83b4e8c92e1b57 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sun, 15 Dec 2019 22:10:34 +0800 Subject: [PATCH 07/11] Update GifImage.cs --- .../HandyControl_Shared/Controls/Image/GifImage.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs b/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs index 38ac8392..0c6678a2 100644 --- a/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs +++ b/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs @@ -39,8 +39,16 @@ namespace HandyControl.Controls private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var ctl = (GifImage) d; - var v = (Uri)e.NewValue; - ctl.Source = new BitmapImage(v); + + if (e.NewValue != null) + { + var v = (Uri)e.NewValue; + ctl.Source = new BitmapImage(v); + } + else + { + ctl.Source = null; + } } public Uri Uri From d3ba2e060c9055bd5b93ddf0388ffcc6cec13bf2 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sun, 15 Dec 2019 22:36:34 +0800 Subject: [PATCH 08/11] Update GifImage.cs --- src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs b/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs index 0c6678a2..114e273b 100644 --- a/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs +++ b/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs @@ -39,11 +39,13 @@ namespace HandyControl.Controls private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var ctl = (GifImage) d; + ctl.StopAnimate(); if (e.NewValue != null) { var v = (Uri)e.NewValue; - ctl.Source = new BitmapImage(v); + ctl.GetGifStreamFromPack(v); + ctl.StartAnimate(); } else { From ad9485ab61288c5ef7bdc0870f73ff4f9a03b491 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sun, 15 Dec 2019 22:59:24 +0800 Subject: [PATCH 09/11] Update DataGridDemoCtl.xaml --- .../UserControl/Styles/DataGridDemoCtl.xaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/DataGridDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/DataGridDemoCtl.xaml index 3e4086ea..922b076d 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/DataGridDemoCtl.xaml +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/DataGridDemoCtl.xaml @@ -23,10 +23,10 @@ - + - + @@ -40,10 +40,10 @@ - + - + From 582c4d3a6f2b5e0e50c6df951c9346bd421686e4 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sun, 15 Dec 2019 23:00:21 +0800 Subject: [PATCH 10/11] Update PaginationDemoCtl.xaml --- .../UserControl/Controls/PaginationDemoCtl.xaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PaginationDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PaginationDemoCtl.xaml index f4695b25..84474d60 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PaginationDemoCtl.xaml +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PaginationDemoCtl.xaml @@ -26,17 +26,17 @@ - + - + - + From 40c81201641229af239cfa1ade919002f1545ab4 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Mon, 16 Dec 2019 21:57:26 +0800 Subject: [PATCH 11/11] add WebsiteView --- .../Data/MessageToken.cs | 2 ++ .../Data/MessageToken.tt | 1 + .../HandyControlDemo_Shared.projitems | 7 ++++ .../Properties/Langs/Lang.Designer.cs | 9 ++++++ .../Properties/Langs/Lang.en.resx | 3 ++ .../Properties/Langs/Lang.fa.resx | 3 ++ .../Properties/Langs/Lang.fr.resx | 3 ++ .../Properties/Langs/Lang.resx | 3 ++ .../Resources/Themes/Basic/Brushes.xaml | 32 ++++++++++++++++--- .../Resources/Themes/Basic/Geometries.xaml | 1 + .../Service/Data/DataService.cs | 13 ++++++++ .../UserControl/Main/NoUserContent.xaml | 5 +++ .../UserControl/Main/WebsitesView.xaml | 14 ++++++++ .../UserControl/Main/WebsitesView.xaml.cs | 10 ++++++ .../ViewModel/ViewModelLocator.cs | 3 ++ 15 files changed, 105 insertions(+), 4 deletions(-) create mode 100644 src/Shared/HandyControlDemo_Shared/UserControl/Main/WebsitesView.xaml create mode 100644 src/Shared/HandyControlDemo_Shared/UserControl/Main/WebsitesView.xaml.cs diff --git a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs index 31a98a9a..5c4cab57 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs @@ -220,6 +220,8 @@ public static readonly string BlogsView = nameof(BlogsView); + public static readonly string WebsitesView = nameof(WebsitesView); + public static readonly string NotifyIconDemo = nameof(NotifyIconDemo); public static readonly string NotifyIconContextDemo = nameof(NotifyIconContextDemo); diff --git a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt index 10c881f8..75d66f65 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt +++ b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt @@ -120,6 +120,7 @@ var messageList = new List "OverView", "ProjectsView", "BlogsView", + "WebsitesView", "NotifyIconDemo", "NotifyIconContextDemo" }; diff --git a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems index c1fd7462..57b7c22a 100644 --- a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems +++ b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems @@ -266,6 +266,9 @@ UnderConstruction.xaml + + WebsitesView.xaml + BorderDemoCtl.xaml @@ -758,6 +761,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 0d469540..9528222d 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs @@ -1779,6 +1779,15 @@ namespace HandyControlDemo.Properties.Langs { } } + /// + /// 查找类似 网站 的本地化字符串。 + /// + public static string Website { + get { + return ResourceManager.GetString("Website", resourceCulture); + } + } + /// /// 查找类似 窗口 的本地化字符串。 /// diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx index 561df37e..078f76d7 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx @@ -693,4 +693,7 @@ Effects + + Website + \ 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 b0c64b31..d2e2b04f 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx @@ -693,4 +693,7 @@ Effects + + Website + \ 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 17878747..2f010af3 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx @@ -693,4 +693,7 @@ Effects + + Website + \ 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 ca3e4807..e82d5ab1 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx @@ -693,4 +693,7 @@ 效果 + + 网站 + \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Resources/Themes/Basic/Brushes.xaml b/src/Shared/HandyControlDemo_Shared/Resources/Themes/Basic/Brushes.xaml index 8fb15afa..59291a58 100644 --- a/src/Shared/HandyControlDemo_Shared/Resources/Themes/Basic/Brushes.xaml +++ b/src/Shared/HandyControlDemo_Shared/Resources/Themes/Basic/Brushes.xaml @@ -46,7 +46,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -70,7 +70,7 @@ - + @@ -79,7 +79,31 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Shared/HandyControlDemo_Shared/Resources/Themes/Basic/Geometries.xaml b/src/Shared/HandyControlDemo_Shared/Resources/Themes/Basic/Geometries.xaml index ca18bb48..31d8020a 100644 --- a/src/Shared/HandyControlDemo_Shared/Resources/Themes/Basic/Geometries.xaml +++ b/src/Shared/HandyControlDemo_Shared/Resources/Themes/Basic/Geometries.xaml @@ -9,6 +9,7 @@ M449.722947 199.412211H706.021053c130.967579 0 237.136842 106.169263 237.136842 237.136842v256.298105c0 130.967579-106.169263 237.136842-237.136842 237.136842H449.722947c-130.965895 0-237.136842-106.169263-237.136842-237.136842V436.549053c0-130.967579 106.170947-237.136842 237.136842-237.136842z m-201.205894-21.557895c0-64.299789-70.085053-104.704-125.850948-72.55579s-55.764211 112.96 0 145.111579 125.850947-8.257684 125.850948-72.555789z m239.528421 234.74021c0-68.003368-74.088421-110.736842-133.037474-76.734315s-58.950737 119.467789 0 153.470315 133.039158-8.730947 133.039158-76.736zM835.368421 692.847158c0-117.596632-128.154947-191.494737-230.123789-132.695579s-101.970526 206.593684 0 265.391158S835.368421 810.443789 835.368421 692.847158z M430.079734 481.464543c45.196365 45.596478 118.486578 45.596478 163.68499 0l360.684736-324.939627c0.547469 3.751441 1.13894 7.490601 1.13894 11.401678l0 404.753417 0 116.754121c0 42.995233-34.547841 77.838809-77.145008 77.838809L145.397996 767.272941c-42.597167 0-77.145008-34.844599-77.145008-77.838809L68.252988 494.839155 68.252988 167.926594c0-3.911076 0.593518-7.65126 1.139963-11.401678L430.079734 481.464543zM910.960992 74.226538 562.044278 387.28558c-38.470173 38.811957-62.276369 38.811957-100.770078 0L112.538611 74.408687c10.011005-4.789073 21.069875-7.673773 32.859385-7.673773l733.044372 0C890.095779 66.735937 901.065622 69.539796 910.960992 74.226538z M260.8 645H160V0h100.8v645zM461.8 152.2h-100.8V1024h100.8V152.2z m201.2 0h-100.8V1024h100.8V152.2zM864 152h-100.8v494H864V152z + M698.026667 597.333333C701.44 569.173333 704 541.013333 704 512 704 482.986667 701.44 454.826667 698.026667 426.666667L842.24 426.666667C849.066667 453.973333 853.333333 482.56 853.333333 512 853.333333 541.44 849.066667 570.026667 842.24 597.333333M622.506667 834.56C648.106667 787.2 667.733333 736 681.386667 682.666667L807.253333 682.666667C766.293333 753.066667 701.013333 807.68 622.506667 834.56M611.84 597.333333 412.16 597.333333C407.893333 569.173333 405.333333 541.013333 405.333333 512 405.333333 482.986667 407.893333 454.4 412.16 426.666667L611.84 426.666667C615.68 454.4 618.666667 482.986667 618.666667 512 618.666667 541.013333 615.68 569.173333 611.84 597.333333M512 851.626667C476.586667 800.426667 448 743.68 430.506667 682.666667L593.493333 682.666667C576 743.68 547.413333 800.426667 512 851.626667M341.333333 341.333333 216.746667 341.333333C257.28 270.506667 322.986667 215.893333 401.066667 189.44 375.466667 236.8 356.266667 288 341.333333 341.333333M216.746667 682.666667 341.333333 682.666667C356.266667 736 375.466667 787.2 401.066667 834.56 322.986667 807.68 257.28 753.066667 216.746667 682.666667M181.76 597.333333C174.933333 570.026667 170.666667 541.44 170.666667 512 170.666667 482.56 174.933333 453.973333 181.76 426.666667L325.973333 426.666667C322.56 454.826667 320 482.986667 320 512 320 541.013333 322.56 569.173333 325.973333 597.333333M512 171.946667C547.413333 223.146667 576 280.32 593.493333 341.333333L430.506667 341.333333C448 280.32 476.586667 223.146667 512 171.946667M807.253333 341.333333 681.386667 341.333333C667.733333 288 648.106667 236.8 622.506667 189.44 701.013333 216.32 766.293333 270.506667 807.253333 341.333333M512 85.333333C276.053333 85.333333 85.333333 277.333333 85.333333 512 85.333333 747.52 276.48 938.666667 512 938.666667 747.52 938.666667 938.666667 747.52 938.666667 512 938.666667 276.48 747.52 85.333333 512 85.333333Z m 41.416254,90 c -0.327378,-7.4702 0.20833,-32.7284 0,-39.901 -5.386902,-0.2083 -4.521603,0.3274 -9.848987,0 0.20833,-5.50595 0.36436,-7.66666 0.126269,-13.32142 4.646472,0.0181 3.439989,-0.009 9.848987,-0.1894 0.09586,-3.7736 0.133082,-3.0791 0.126269,-7.38674 0.18259,-3.73943 -0.486609,-10.54308 4.293149,-14.96288 4.779758,-4.4198 13.606811,-3.64808 22.223356,-3.53554 -0.04417,5.73754 -0.03936,9.37986 0,12.87945 -5.049924,0.46388 -7.309188,-0.33689 -10.85914,1.26269 -1.403378,3.17794 -1.569601,4.80531 -1.262691,11.93242 3.147964,-0.13336 8.201788,-0.1378 12.626907,0 -0.995158,6.00899 -0.948285,7.62376 -1.767767,13.06882 -3.676625,0.088 -5.605721,-0.1488 -11.111678,0 -0.148814,6.756 0.357147,33.0107 0,40.1536 -6.428576,0.1786 -8.174438,-0.03 -14.394674,0 z m 10.44335,90 c 11.073313,0.3952 19.483106,-1.8358 23.901837,-7.1603 -7.9736,-1.4292 -11.832311,-4.1933 -15.078321,-11.0837 3.459698,0.8219 5.795894,0.6358 7.606781,-0.607 -7.19593,-1.719 -12.734543,-6.7971 -13.741664,-15.836 2.766355,1.55307 5.466848,2.66623 7.828682,2.0203 -4.336544,-2.92911 -9.838998,-10.47636 -5.555839,-22.47589 8.400675,11.87052 23.824269,17.67568 33.840111,17.67767 -0.936406,-9.74688 5.88057,-19.46521 15.302849,-19.97853 8.13118,-0.50719 10.57457,4.01944 12.476346,4.82624 3.644547,0.13419 7.393301,-1.74401 10.354063,-3.53553 -1.380842,4.47157 -5.06769,5.62903 -6.313453,8.58629 5.42317,0.41513 5.891376,-1.53111 8.333758,-2.0203 -2.071414,3.75017 -5.393863,5.00034 -7.323606,8.08122 -1.633654,16.12573 -5.16049,27.57123 -14.647212,36.36553 -13.825764,11.3764 -34.755458,17.369 -56.984332,5.14 z M68.191078 915.462005l161.384597 0L229.575676 431.30719 68.191078 431.30719 68.191078 915.462005zM955.808922 471.653083c0-44.582381-36.109406-80.69281-80.69281-80.69281L620.329241 390.960273 658.859789 206.578915c0.807389-4.034896 1.412163-8.271384 1.412163-12.709463 0-16.743336-6.859221-31.873941-17.752316-42.767036l-42.968627-42.565445L333.871043 374.216937c-14.524808 14.7264-23.602557 34.899858-23.602557 57.090253l0 403.462005c0 44.582381 36.109406 80.69281 80.69281 80.69281l363.116111 0c33.487695 0 62.133106-20.37505 74.236771-49.222051l121.643478-284.441261c3.63069-9.279341 5.850242-19.164478 5.850242-29.452799L955.807898 475.083206l-0.403183-0.403183L955.808922 471.653083z diff --git a/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs b/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs index c317945b..c4389402 100644 --- a/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs +++ b/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs @@ -185,6 +185,19 @@ namespace HandyControlDemo.Service }; } + internal List GetWebsiteDataList() + { + return new List + { + new AvatarModel + { + DisplayName = "Dotnet9", + AvatarUri = "https://pic.cnblogs.com/avatar/1663243/20191124121029.png", + Link = "https://dotnet9.com/" + } + }; + } + internal ObservableCollection GetCardDataList() { return new ObservableCollection diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/NoUserContent.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Main/NoUserContent.xaml index 3857a4e2..d4034aef 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/NoUserContent.xaml +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/NoUserContent.xaml @@ -67,6 +67,11 @@ + + + + + diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/WebsitesView.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Main/WebsitesView.xaml new file mode 100644 index 00000000..74852972 --- /dev/null +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/WebsitesView.xaml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/WebsitesView.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Main/WebsitesView.xaml.cs new file mode 100644 index 00000000..e4bba9d3 --- /dev/null +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/WebsitesView.xaml.cs @@ -0,0 +1,10 @@ +namespace HandyControlDemo.UserControl +{ + public partial class WebsitesView + { + public WebsitesView() + { + InitializeComponent(); + } + } +} diff --git a/src/Shared/HandyControlDemo_Shared/ViewModel/ViewModelLocator.cs b/src/Shared/HandyControlDemo_Shared/ViewModel/ViewModelLocator.cs index 9a65e1ea..af874736 100644 --- a/src/Shared/HandyControlDemo_Shared/ViewModel/ViewModelLocator.cs +++ b/src/Shared/HandyControlDemo_Shared/ViewModel/ViewModelLocator.cs @@ -25,6 +25,7 @@ namespace HandyControlDemo.ViewModel SimpleIoc.Default.Register(() => new ItemsDisplayViewModel(dataService.GetContributorDataList), "Contributors"); SimpleIoc.Default.Register(() => new ItemsDisplayViewModel(dataService.GetBlogDataList), "Blogs"); SimpleIoc.Default.Register(() => new ItemsDisplayViewModel(dataService.GetProjectDataList), "Projects"); + SimpleIoc.Default.Register(() => new ItemsDisplayViewModel(dataService.GetWebsiteDataList), "Websites"); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); @@ -66,6 +67,8 @@ namespace HandyControlDemo.ViewModel public ItemsDisplayViewModel ProjectsView => ServiceLocator.Current.GetInstance("Projects"); + public ItemsDisplayViewModel WebsitesView => ServiceLocator.Current.GetInstance("Websites"); + public StepBarDemoViewModel StepBarDemo => ServiceLocator.Current.GetInstance(); public PaginationDemoViewModel PaginationDemo => ServiceLocator.Current.GetInstance();