From 9092fe6ec7a75142fb1d14cfae0ee4b8e7c125d1 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sat, 13 Jul 2024 14:56:37 +0800 Subject: [PATCH 1/9] fix: memory leak of some controls. (#1482) --- .../Controls/ImageBrowserDemoCtl.xaml | 2 +- .../Controls/ImageBrowserDemoCtl.xaml.cs | 9 ++++++- .../Controls/Image/ImageViewer.cs | 25 ++++++++++++++++++- .../Controls/Window/ImageBrowser.cs | 7 ++++++ 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBrowserDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBrowserDemoCtl.xaml index f39b909f9..e7249c995 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBrowserDemoCtl.xaml +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBrowserDemoCtl.xaml @@ -8,7 +8,7 @@ xmlns:hc="https://handyorg.github.io/handycontrol"> - + - - + + - + - + - - + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - + - + @@ -153,23 +153,23 @@ - + - - + + - - - + + - + @@ -199,47 +199,47 @@ - + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - + - + @@ -248,82 +248,82 @@ diff --git a/src/Shared/HandyControl_Shared/Themes/Theme.xaml b/src/Shared/HandyControl_Shared/Themes/Theme.xaml index aa6132b21..eddbafd10 100644 --- a/src/Shared/HandyControl_Shared/Themes/Theme.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Theme.xaml @@ -4911,6 +4911,7 @@ + @@ -7345,8 +7346,9 @@ + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Button.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Button.axaml index dfb8ebed4..59670c001 100644 --- a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Button.axaml +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Button.axaml @@ -1,102 +1,141 @@  - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + - + - - + - + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ContentControl.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ContentControl.axaml index 229114f9a..3676da9e9 100644 --- a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ContentControl.axaml +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ContentControl.axaml @@ -1,19 +1,19 @@  - + - + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ItemsControl.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ItemsControl.axaml new file mode 100644 index 000000000..8860b0829 --- /dev/null +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ItemsControl.axaml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ListBox.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ListBox.axaml new file mode 100644 index 000000000..b84bd017b --- /dev/null +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ListBox.axaml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ListBoxItem.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ListBoxItem.axaml new file mode 100644 index 000000000..471b18671 --- /dev/null +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ListBoxItem.axaml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ScrollBar.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ScrollBar.axaml new file mode 100644 index 000000000..0a7da509d --- /dev/null +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ScrollBar.axaml @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ScrollViewer.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ScrollViewer.axaml new file mode 100644 index 000000000..2e327235b --- /dev/null +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/ScrollViewer.axaml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Style.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Style.axaml index c3b84f020..d45e0da78 100644 --- a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Style.axaml +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Style.axaml @@ -1,17 +1,27 @@  - + + + + + + + + + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/TabControl.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/TabControl.axaml new file mode 100644 index 000000000..5ff351a6b --- /dev/null +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/TabControl.axaml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/TabItem.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/TabItem.axaml new file mode 100644 index 000000000..533f67cdc --- /dev/null +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/TabItem.axaml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/UserControl.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/UserControl.axaml index 619491302..8c2c431bc 100644 --- a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/UserControl.axaml +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/UserControl.axaml @@ -1,19 +1,19 @@  - + - + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Window.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Window.axaml index 9de37a332..6cde86101 100644 --- a/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Window.axaml +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Styles/Window.axaml @@ -1,31 +1,40 @@  - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - + VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" /> + + + + + diff --git a/src/Avalonia/HandyControl_Avalonia/Themes/Theme.axaml b/src/Avalonia/HandyControl_Avalonia/Themes/Theme.axaml index 13ee12e2a..50ec525c0 100644 --- a/src/Avalonia/HandyControl_Avalonia/Themes/Theme.axaml +++ b/src/Avalonia/HandyControl_Avalonia/Themes/Theme.axaml @@ -4,11 +4,11 @@ - + - - + + diff --git a/src/Avalonia/HandyControl_Avalonia/Tools/Converter/BorderClipConverter.cs b/src/Avalonia/HandyControl_Avalonia/Tools/Converter/BorderClipConverter.cs new file mode 100644 index 000000000..0c79f5da3 --- /dev/null +++ b/src/Avalonia/HandyControl_Avalonia/Tools/Converter/BorderClipConverter.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using Avalonia; +using Avalonia.Data.Converters; +using Avalonia.Media; + +namespace HandyControl.Tools.Converter; + +public class BorderClipConverter : IMultiValueConverter +{ + private static readonly Geometry Empty = new StreamGeometry(); + + public object Convert(IList values, Type targetType, object? parameter, CultureInfo culture) + { + if (values is not [double width, double height, CornerRadius radius]) + { + return AvaloniaProperty.UnsetValue; + } + + if (width < double.Epsilon || height < double.Epsilon) + { + return Empty; + } + + return new PathGeometry + { + Figures = new PathFigures + { + new() + { + StartPoint = new Point(radius.TopLeft, 0), + Segments = CreateSegments(width, height, radius), + }, + } + }; + } + + private static PathSegments CreateSegments(double width, double height, CornerRadius radius) + { + return new PathSegments + { + new LineSegment + { + Point = new Point(width - radius.TopRight, 0), + }, + new ArcSegment + { + Point = new Point(width, radius.TopRight), + Size = new Size(radius.TopRight, radius.TopRight), + RotationAngle = 90, + IsLargeArc = false, + SweepDirection = SweepDirection.Clockwise, + }, + new LineSegment + { + Point = new Point(width, height - radius.BottomRight), + }, + new ArcSegment + { + Point = new Point(width - radius.BottomRight, height), + Size = new Size(radius.BottomRight, radius.BottomRight), + RotationAngle = 90, + IsLargeArc = false, + SweepDirection = SweepDirection.Clockwise, + }, + new LineSegment + { + Point = new Point(radius.BottomLeft, height), + }, + new ArcSegment + { + Point = new Point(0, height - radius.BottomLeft), + Size = new Size(radius.BottomLeft, radius.BottomLeft), + RotationAngle = 90, + IsLargeArc = false, + SweepDirection = SweepDirection.Clockwise, + }, + new LineSegment + { + Point = new Point(0, radius.TopLeft), + }, + new ArcSegment + { + Point = new Point(radius.TopLeft, 0), + Size = new Size(radius.TopLeft, radius.TopLeft), + RotationAngle = 90, + IsLargeArc = false, + SweepDirection = SweepDirection.Clockwise, + }, + }; + } +} diff --git a/src/Avalonia/HandyControl_Avalonia/Tools/Helper/ResourceHelper.cs b/src/Avalonia/HandyControl_Avalonia/Tools/Helper/ResourceHelper.cs new file mode 100644 index 000000000..0f8a913d5 --- /dev/null +++ b/src/Avalonia/HandyControl_Avalonia/Tools/Helper/ResourceHelper.cs @@ -0,0 +1,22 @@ +using Avalonia; + +namespace HandyControl.Tools; + +public class ResourceHelper +{ + public static T? GetResource(string key) + { + if (Application.Current is null) + { + return default; + } + + if (Application.Current.TryGetResource(key, Application.Current.ActualThemeVariant, out var value) && + value is T resource) + { + return resource; + } + + return default; + } +} diff --git a/src/HandyControl.sln b/src/HandyControl.sln index c7af0484b..cfbe2d5d9 100644 --- a/src/HandyControl.sln +++ b/src/HandyControl.sln @@ -37,6 +37,10 @@ EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.Expression.Interactions", "Shared\Microsoft.Expression.Interactions\Microsoft.Expression.Interactions.shproj", "{3531857C-28FC-4E0F-82D9-BFBB70740E04}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Avalonia", "Avalonia", "{A490C3E9-0CC2-46EE-BE9A-95D3DCBF211D}" + ProjectSection(SolutionItems) = preProject + Avalonia\.editorconfig = Avalonia\.editorconfig + Avalonia\Directory.Build.props = Avalonia\Directory.Build.props + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandyControl_Avalonia", "Avalonia\HandyControl_Avalonia\HandyControl_Avalonia.csproj", "{34D39209-C744-41AA-91D6-C15C68E2A1D9}" EndProject @@ -45,54 +49,70 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug-Avalonia|Any CPU = Debug-Avalonia|Any CPU Debug-Net40|Any CPU = Debug-Net40|Any CPU Release|Any CPU = Release|Any CPU + Release-Avalonia|Any CPU = Release-Avalonia|Any CPU Release-Net40|Any CPU = Release-Net40|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Avalonia|Any CPU.ActiveCfg = Debug|Any CPU {DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU {DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.Build.0 = Release|Any CPU + {DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Avalonia|Any CPU.ActiveCfg = Release|Any CPU {DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU {9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Avalonia|Any CPU.ActiveCfg = Debug|Any CPU {9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU {9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.ActiveCfg = Release|Any CPU {9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.Build.0 = Release|Any CPU + {9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Avalonia|Any CPU.ActiveCfg = Release|Any CPU {9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU {32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug-Avalonia|Any CPU.ActiveCfg = Debug|Any CPU {32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU {32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU {32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release-Avalonia|Any CPU.ActiveCfg = Release|Any CPU {32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU {32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release-Net40|Any CPU.Build.0 = Release|Any CPU {D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug-Avalonia|Any CPU.ActiveCfg = Debug|Any CPU {D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU {D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU {D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release-Avalonia|Any CPU.ActiveCfg = Release|Any CPU {D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU {D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release-Net40|Any CPU.Build.0 = Release|Any CPU {D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug-Avalonia|Any CPU.ActiveCfg = Debug|Any CPU {D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU {D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU {D8A4748C-0500-4F63-BC47-3506658C68F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {D8A4748C-0500-4F63-BC47-3506658C68F7}.Release|Any CPU.Build.0 = Release|Any CPU + {D8A4748C-0500-4F63-BC47-3506658C68F7}.Release-Avalonia|Any CPU.ActiveCfg = Release|Any CPU {D8A4748C-0500-4F63-BC47-3506658C68F7}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU {D8A4748C-0500-4F63-BC47-3506658C68F7}.Release-Net40|Any CPU.Build.0 = Release|Any CPU {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Debug-Avalonia|Any CPU.ActiveCfg = Debug|Any CPU + {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Debug-Avalonia|Any CPU.Build.0 = Debug|Any CPU {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Release|Any CPU.Build.0 = Release|Any CPU + {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Release-Avalonia|Any CPU.ActiveCfg = Release|Any CPU + {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Release-Avalonia|Any CPU.Build.0 = Release|Any CPU {34D39209-C744-41AA-91D6-C15C68E2A1D9}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Debug-Avalonia|Any CPU.ActiveCfg = Debug|Any CPU + {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Debug-Avalonia|Any CPU.Build.0 = Debug|Any CPU {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Release|Any CPU.Build.0 = Release|Any CPU + {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Release-Avalonia|Any CPU.ActiveCfg = Release|Any CPU + {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Release-Avalonia|Any CPU.Build.0 = Release|Any CPU {99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution 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 8b15f7b07..81d3c7a40 100644 --- a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj +++ b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj @@ -17,7 +17,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + 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 ca398c8bd..ab2b902ed 100644 --- a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj +++ b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj @@ -19,7 +19,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangDecorator.cs b/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangDecorator.cs deleted file mode 100644 index 5dd7cb48e..000000000 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangDecorator.cs +++ /dev/null @@ -1,2373 +0,0 @@ -using System.ComponentModel; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using HandyControl.Tools; - -namespace HandyControlDemo.Properties.Langs -{ - public class LangProvider : INotifyPropertyChanged - { - internal static LangProvider Instance => ResourceHelper.GetResource("DemoLangs"); - - private static string CultureInfoStr; - - public static CultureInfo Culture - { - get => Lang.Culture; - set - { - if (value == null) return; - if (Equals(CultureInfoStr, value.EnglishName)) return; - Lang.Culture = value; - CultureInfoStr = value.EnglishName; - - Instance.UpdateLangs(); - } - } - - public static string GetLang(string key) => Lang.ResourceManager.GetString(key, Culture); - - public static void SetLang(DependencyObject dependencyObject, DependencyProperty dependencyProperty, string key) => - BindingOperations.SetBinding(dependencyObject, dependencyProperty, new Binding(key) - { - Source = Instance, - Mode = BindingMode.OneWay - }); - - private void UpdateLangs() - { - OnPropertyChanged(nameof(About)); - OnPropertyChanged(nameof(AddItem)); - OnPropertyChanged(nameof(AnimationPath)); - OnPropertyChanged(nameof(AppClosingTip)); - OnPropertyChanged(nameof(Ask)); - OnPropertyChanged(nameof(Badge)); - OnPropertyChanged(nameof(BasicInfo)); - OnPropertyChanged(nameof(BasicLayout)); - OnPropertyChanged(nameof(Blink)); - OnPropertyChanged(nameof(Blog)); - OnPropertyChanged(nameof(Border)); - OnPropertyChanged(nameof(Brush)); - OnPropertyChanged(nameof(Button)); - OnPropertyChanged(nameof(ButtonCustom)); - OnPropertyChanged(nameof(ButtonGroup)); - OnPropertyChanged(nameof(Calendar)); - OnPropertyChanged(nameof(CalendarWithClock)); - OnPropertyChanged(nameof(Card)); - OnPropertyChanged(nameof(Carousel)); - OnPropertyChanged(nameof(ChangeLangAsk)); - OnPropertyChanged(nameof(ChatBubble)); - OnPropertyChanged(nameof(Chatroom)); - OnPropertyChanged(nameof(CheckBox)); - OnPropertyChanged(nameof(CirclePanel)); - OnPropertyChanged(nameof(Clear)); - OnPropertyChanged(nameof(Click2Count)); - OnPropertyChanged(nameof(Clock)); - OnPropertyChanged(nameof(ColorPicker)); - OnPropertyChanged(nameof(ColumnOffset)); - OnPropertyChanged(nameof(ColumnSpacing)); - OnPropertyChanged(nameof(ComboBox)); - OnPropertyChanged(nameof(ComingSoon)); - OnPropertyChanged(nameof(Comment)); - OnPropertyChanged(nameof(Common)); - OnPropertyChanged(nameof(CompareSlider)); - OnPropertyChanged(nameof(Complete)); - OnPropertyChanged(nameof(ContentDemoStr)); - OnPropertyChanged(nameof(Contributors)); - OnPropertyChanged(nameof(Controls)); - OnPropertyChanged(nameof(CoverFlow)); - OnPropertyChanged(nameof(CoverView)); - OnPropertyChanged(nameof(Danger)); - OnPropertyChanged(nameof(DataGrid)); - OnPropertyChanged(nameof(DatePicker)); - OnPropertyChanged(nameof(DateTimePicker)); - OnPropertyChanged(nameof(Default)); - OnPropertyChanged(nameof(Demo)); - OnPropertyChanged(nameof(Dialog)); - OnPropertyChanged(nameof(DialogDemo)); - OnPropertyChanged(nameof(Divider)); - OnPropertyChanged(nameof(Doc_cn)); - OnPropertyChanged(nameof(Doc_en)); - OnPropertyChanged(nameof(Documentation)); - OnPropertyChanged(nameof(DragHere)); - OnPropertyChanged(nameof(Drawer)); - OnPropertyChanged(nameof(Effects)); - OnPropertyChanged(nameof(Email)); - OnPropertyChanged(nameof(Error)); - OnPropertyChanged(nameof(Exit)); - OnPropertyChanged(nameof(Expander)); - OnPropertyChanged(nameof(Fatal)); - OnPropertyChanged(nameof(FlipClock)); - OnPropertyChanged(nameof(FloatingBlock)); - OnPropertyChanged(nameof(FlowDocument)); - OnPropertyChanged(nameof(FlowDocumentPageViewer)); - OnPropertyChanged(nameof(FlowDocumentReader)); - OnPropertyChanged(nameof(FlowDocumentScrollViewer)); - OnPropertyChanged(nameof(Frame)); - OnPropertyChanged(nameof(GifImage)); - OnPropertyChanged(nameof(GotoTop)); - OnPropertyChanged(nameof(Gravatar)); - OnPropertyChanged(nameof(Grid)); - OnPropertyChanged(nameof(GroupBox)); - OnPropertyChanged(nameof(Groups)); - OnPropertyChanged(nameof(Growl)); - OnPropertyChanged(nameof(GrowlAsk)); - OnPropertyChanged(nameof(GrowlDemo)); - OnPropertyChanged(nameof(GrowlError)); - OnPropertyChanged(nameof(GrowlFatal)); - OnPropertyChanged(nameof(GrowlInfo)); - OnPropertyChanged(nameof(GrowlSuccess)); - OnPropertyChanged(nameof(GrowlWarning)); - OnPropertyChanged(nameof(HatchBrushGenerator)); - OnPropertyChanged(nameof(HoneycombPanel)); - OnPropertyChanged(nameof(HybridLayout)); - OnPropertyChanged(nameof(Ignore)); - OnPropertyChanged(nameof(ImageBlock)); - OnPropertyChanged(nameof(ImageBrowser)); - OnPropertyChanged(nameof(Index)); - OnPropertyChanged(nameof(Info)); - OnPropertyChanged(nameof(InteractiveDialog)); - OnPropertyChanged(nameof(IsNotPhone)); - OnPropertyChanged(nameof(Label)); - OnPropertyChanged(nameof(LangComment)); - OnPropertyChanged(nameof(ListBox)); - OnPropertyChanged(nameof(ListView)); - OnPropertyChanged(nameof(Loading)); - OnPropertyChanged(nameof(Magnifier)); - OnPropertyChanged(nameof(Menu)); - OnPropertyChanged(nameof(MessageBox)); - OnPropertyChanged(nameof(Morphing_Animation)); - OnPropertyChanged(nameof(Name)); - OnPropertyChanged(nameof(NewWindow)); - OnPropertyChanged(nameof(Next)); - OnPropertyChanged(nameof(Notification)); - OnPropertyChanged(nameof(NotifyIcon)); - OnPropertyChanged(nameof(NumericUpDown)); - OnPropertyChanged(nameof(Off)); - OnPropertyChanged(nameof(Ok)); - OnPropertyChanged(nameof(On)); - OnPropertyChanged(nameof(OpenBlurWindow)); - OnPropertyChanged(nameof(OpenCommonWindow)); - OnPropertyChanged(nameof(OpenCustomContentWindow)); - OnPropertyChanged(nameof(OpenCustomMessageWindow)); - OnPropertyChanged(nameof(OpenCustomNonClientAreaWindow)); - OnPropertyChanged(nameof(OpenGlowWindow)); - OnPropertyChanged(nameof(OpenImageBrowser)); - OnPropertyChanged(nameof(OpenMessageWindow)); - OnPropertyChanged(nameof(OpenMouseFollowWindow)); - OnPropertyChanged(nameof(OpenNativeCommonWindow)); - OnPropertyChanged(nameof(OpenNavigationWindow)); - OnPropertyChanged(nameof(OpenNoNonClientAreaDragableWindow)); - OnPropertyChanged(nameof(OpenPanel)); - OnPropertyChanged(nameof(OpenSprite)); - OnPropertyChanged(nameof(OutlineText)); - OnPropertyChanged(nameof(Pagination)); - OnPropertyChanged(nameof(PasswordBox)); - OnPropertyChanged(nameof(PinBox)); - OnPropertyChanged(nameof(PleaseInput)); - OnPropertyChanged(nameof(PleaseWait)); - OnPropertyChanged(nameof(PlsEnterContent)); - OnPropertyChanged(nameof(PlsEnterEmail)); - OnPropertyChanged(nameof(PlsEnterKey)); - OnPropertyChanged(nameof(Poptip)); - OnPropertyChanged(nameof(PoptipPositionStr)); - OnPropertyChanged(nameof(PracticalDemos)); - OnPropertyChanged(nameof(Prev)); - OnPropertyChanged(nameof(PreviewSlider)); - OnPropertyChanged(nameof(Primary)); - OnPropertyChanged(nameof(ProgressBar)); - OnPropertyChanged(nameof(ProgressButton)); - OnPropertyChanged(nameof(Project)); - OnPropertyChanged(nameof(PushToTalk)); - OnPropertyChanged(nameof(QQGroup)); - OnPropertyChanged(nameof(RadioButton)); - OnPropertyChanged(nameof(RangeSlider)); - OnPropertyChanged(nameof(Rate)); - OnPropertyChanged(nameof(Recommendation)); - OnPropertyChanged(nameof(Register)); - OnPropertyChanged(nameof(RelativePanel)); - OnPropertyChanged(nameof(Remark)); - OnPropertyChanged(nameof(RemoveItem)); - OnPropertyChanged(nameof(RepeatButton)); - OnPropertyChanged(nameof(Reply)); - OnPropertyChanged(nameof(Repository)); - OnPropertyChanged(nameof(ResponsiveLayout)); - OnPropertyChanged(nameof(RichTextBox)); - OnPropertyChanged(nameof(RightClickHere)); - OnPropertyChanged(nameof(RunningBlock)); - OnPropertyChanged(nameof(Screenshot)); - OnPropertyChanged(nameof(ScrollViewer)); - OnPropertyChanged(nameof(SearchBar)); - OnPropertyChanged(nameof(Second)); - OnPropertyChanged(nameof(Selected)); - OnPropertyChanged(nameof(SendNotification)); - OnPropertyChanged(nameof(Shield)); - OnPropertyChanged(nameof(ShowInCurrentWindow)); - OnPropertyChanged(nameof(ShowInMainWindow)); - OnPropertyChanged(nameof(ShowRowNumber)); - OnPropertyChanged(nameof(SideMenu)); - OnPropertyChanged(nameof(Slider)); - OnPropertyChanged(nameof(SplitButton)); - OnPropertyChanged(nameof(Sprite)); - OnPropertyChanged(nameof(StartScreenshot)); - OnPropertyChanged(nameof(StaysOpen)); - OnPropertyChanged(nameof(Step)); - OnPropertyChanged(nameof(StepBar)); - OnPropertyChanged(nameof(Styles)); - OnPropertyChanged(nameof(SubTitle)); - OnPropertyChanged(nameof(Success)); - OnPropertyChanged(nameof(TabControl)); - OnPropertyChanged(nameof(Tag)); - OnPropertyChanged(nameof(Text)); - OnPropertyChanged(nameof(TextBlock)); - OnPropertyChanged(nameof(TextBox)); - OnPropertyChanged(nameof(TextDialog)); - OnPropertyChanged(nameof(TextDialogInControl)); - OnPropertyChanged(nameof(TextDialogWithTimer)); - OnPropertyChanged(nameof(TimeBar)); - OnPropertyChanged(nameof(TimePicker)); - OnPropertyChanged(nameof(Tip)); - OnPropertyChanged(nameof(Title)); - OnPropertyChanged(nameof(TitleDemoStr1)); - OnPropertyChanged(nameof(TitleDemoStr2)); - OnPropertyChanged(nameof(TitleDemoStr3)); - OnPropertyChanged(nameof(ToggleButton)); - OnPropertyChanged(nameof(ToolBar)); - OnPropertyChanged(nameof(Tools)); - OnPropertyChanged(nameof(Transfer)); - OnPropertyChanged(nameof(TransitioningContentControl)); - OnPropertyChanged(nameof(TreeView)); - OnPropertyChanged(nameof(Try2CloseApp)); - OnPropertyChanged(nameof(Type)); - OnPropertyChanged(nameof(UploadFile)); - OnPropertyChanged(nameof(UploadStr)); - OnPropertyChanged(nameof(Visibility)); - OnPropertyChanged(nameof(Vsix)); - OnPropertyChanged(nameof(Warning)); - OnPropertyChanged(nameof(WaterfallPanel)); - OnPropertyChanged(nameof(Website)); - OnPropertyChanged(nameof(Window)); - } - - /// - /// 查找类似 关于 的本地化字符串。 - /// - public string About => Lang.About; - - /// - /// 查找类似 添加项 的本地化字符串。 - /// - public string AddItem => Lang.AddItem; - - /// - /// 查找类似 动画路径 的本地化字符串。 - /// - public string AnimationPath => Lang.AnimationPath; - - /// - /// 查找类似 托盘图标已打开,将隐藏窗口而不是关闭程序 的本地化字符串。 - /// - public string AppClosingTip => Lang.AppClosingTip; - - /// - /// 查找类似 询问 的本地化字符串。 - /// - public string Ask => Lang.Ask; - - /// - /// 查找类似 标记 的本地化字符串。 - /// - public string Badge => Lang.Badge; - - /// - /// 查找类似 填写基本信息 的本地化字符串。 - /// - public string BasicInfo => Lang.BasicInfo; - - /// - /// 查找类似 基础布局 的本地化字符串。 - /// - public string BasicLayout => Lang.BasicLayout; - - /// - /// 查找类似 闪烁 的本地化字符串。 - /// - public string Blink => Lang.Blink; - - /// - /// 查找类似 博客 的本地化字符串。 - /// - public string Blog => Lang.Blog; - - /// - /// 查找类似 边框 的本地化字符串。 - /// - public string Border => Lang.Border; - - /// - /// 查找类似 画刷 的本地化字符串。 - /// - public string Brush => Lang.Brush; - - /// - /// 查找类似 按钮 的本地化字符串。 - /// - public string Button => Lang.Button; - - /// - /// 查找类似 自定义按钮 的本地化字符串。 - /// - public string ButtonCustom => Lang.ButtonCustom; - - /// - /// 查找类似 按钮组 的本地化字符串。 - /// - public string ButtonGroup => Lang.ButtonGroup; - - /// - /// 查找类似 日历 的本地化字符串。 - /// - public string Calendar => Lang.Calendar; - - /// - /// 查找类似 带时钟的日历 的本地化字符串。 - /// - public string CalendarWithClock => Lang.CalendarWithClock; - - /// - /// 查找类似 卡片 的本地化字符串。 - /// - public string Card => Lang.Card; - - /// - /// 查找类似 轮播 的本地化字符串。 - /// - public string Carousel => Lang.Carousel; - - /// - /// 查找类似 是否重启以更改语言? 的本地化字符串。 - /// - public string ChangeLangAsk => Lang.ChangeLangAsk; - - /// - /// 查找类似 对话气泡 的本地化字符串。 - /// - public string ChatBubble => Lang.ChatBubble; - - /// - /// 查找类似 讨论室 的本地化字符串。 - /// - public string Chatroom => Lang.Chatroom; - - /// - /// 查找类似 复选框 的本地化字符串。 - /// - public string CheckBox => Lang.CheckBox; - - /// - /// 查找类似 圆形布局 的本地化字符串。 - /// - public string CirclePanel => Lang.CirclePanel; - - /// - /// 查找类似 清空 的本地化字符串。 - /// - public string Clear => Lang.Clear; - - /// - /// 查找类似 点击计数 的本地化字符串。 - /// - public string Click2Count => Lang.Click2Count; - - /// - /// 查找类似 时钟 的本地化字符串。 - /// - public string Clock => Lang.Clock; - - /// - /// 查找类似 颜色拾取器 的本地化字符串。 - /// - public string ColorPicker => Lang.ColorPicker; - - /// - /// 查找类似 分栏偏移 的本地化字符串。 - /// - public string ColumnOffset => Lang.ColumnOffset; - - /// - /// 查找类似 分栏间隔 的本地化字符串。 - /// - public string ColumnSpacing => Lang.ColumnSpacing; - - /// - /// 查找类似 组合框 的本地化字符串。 - /// - public string ComboBox => Lang.ComboBox; - - /// - /// 查找类似 敬请期待 的本地化字符串。 - /// - public string ComingSoon => Lang.ComingSoon; - - /// - /// 查找类似 评论 的本地化字符串。 - /// - public string Comment => Lang.Comment; - - /// - /// 查找类似 一般 的本地化字符串。 - /// - public string Common => Lang.Common; - - /// - /// 查找类似 对比滑块 的本地化字符串。 - /// - public string CompareSlider => Lang.CompareSlider; - - /// - /// 查找类似 完成 的本地化字符串。 - /// - public string Complete => Lang.Complete; - - /// - /// 查找类似 这是内容 的本地化字符串。 - /// - public string ContentDemoStr => Lang.ContentDemoStr; - - /// - /// 查找类似 贡献者 的本地化字符串。 - /// - public string Contributors => Lang.Contributors; - - /// - /// 查找类似 控件 的本地化字符串。 - /// - public string Controls => Lang.Controls; - - /// - /// 查找类似 封面流 的本地化字符串。 - /// - public string CoverFlow => Lang.CoverFlow; - - /// - /// 查找类似 封面视图 的本地化字符串。 - /// - public string CoverView => Lang.CoverView; - - /// - /// 查找类似 危险 的本地化字符串。 - /// - public string Danger => Lang.Danger; - - /// - /// 查找类似 数据表格 的本地化字符串。 - /// - public string DataGrid => Lang.DataGrid; - - /// - /// 查找类似 日期选择器 的本地化字符串。 - /// - public string DatePicker => Lang.DatePicker; - - /// - /// 查找类似 日期时间选择器 的本地化字符串。 - /// - public string DateTimePicker => Lang.DateTimePicker; - - /// - /// 查找类似 默认 的本地化字符串。 - /// - public string Default => Lang.Default; - - /// - /// 查找类似 示例 的本地化字符串。 - /// - public string Demo => Lang.Demo; - - /// - /// 查找类似 对话框 的本地化字符串。 - /// - public string Dialog => Lang.Dialog; - - /// - /// 查找类似 对话框示例 的本地化字符串。 - /// - public string DialogDemo => Lang.DialogDemo; - - /// - /// 查找类似 分割线 的本地化字符串。 - /// - public string Divider => Lang.Divider; - - /// - /// 查找类似 中文文档 的本地化字符串。 - /// - public string Doc_cn => Lang.Doc_cn; - - /// - /// 查找类似 英文文档 的本地化字符串。 - /// - public string Doc_en => Lang.Doc_en; - - /// - /// 查找类似 文献资料 的本地化字符串。 - /// - public string Documentation => Lang.Documentation; - - /// - /// 查找类似 在这里拖拽 的本地化字符串。 - /// - public string DragHere => Lang.DragHere; - - /// - /// 查找类似 抽屉 的本地化字符串。 - /// - public string Drawer => Lang.Drawer; - - /// - /// 查找类似 效果 的本地化字符串。 - /// - public string Effects => Lang.Effects; - - /// - /// 查找类似 邮箱 的本地化字符串。 - /// - public string Email => Lang.Email; - - /// - /// 查找类似 错误 的本地化字符串。 - /// - public string Error => Lang.Error; - - /// - /// 查找类似 退出 的本地化字符串。 - /// - public string Exit => Lang.Exit; - - /// - /// 查找类似 展开框 的本地化字符串。 - /// - public string Expander => Lang.Expander; - - /// - /// 查找类似 严重 的本地化字符串。 - /// - public string Fatal => Lang.Fatal; - - /// - /// 查找类似 翻页时钟 的本地化字符串。 - /// - public string FlipClock => Lang.FlipClock; - - /// - /// 查找类似 漂浮块 的本地化字符串。 - /// - public string FloatingBlock => Lang.FloatingBlock; - - /// - /// 查找类似 流文档 的本地化字符串。 - /// - public string FlowDocument => Lang.FlowDocument; - - /// - /// 查找类似 流文档单页视图 的本地化字符串。 - /// - public string FlowDocumentPageViewer => Lang.FlowDocumentPageViewer; - - /// - /// 查找类似 流文档查看器 的本地化字符串。 - /// - public string FlowDocumentReader => Lang.FlowDocumentReader; - - /// - /// 查找类似 流文档滚动视图 的本地化字符串。 - /// - public string FlowDocumentScrollViewer => Lang.FlowDocumentScrollViewer; - - /// - /// 查找类似 导航框架 的本地化字符串。 - /// - public string Frame => Lang.Frame; - - /// - /// 查找类似 Gif图片 的本地化字符串。 - /// - public string GifImage => Lang.GifImage; - - /// - /// 查找类似 回到顶部 的本地化字符串。 - /// - public string GotoTop => Lang.GotoTop; - - /// - /// 查找类似 头像 的本地化字符串。 - /// - public string Gravatar => Lang.Gravatar; - - /// - /// 查找类似 栅格 的本地化字符串。 - /// - public string Grid => Lang.Grid; - - /// - /// 查找类似 分组框 的本地化字符串。 - /// - public string GroupBox => Lang.GroupBox; - - /// - /// 查找类似 组数 的本地化字符串。 - /// - public string Groups => Lang.Groups; - - /// - /// 查找类似 信息通知 的本地化字符串。 - /// - public string Growl => Lang.Growl; - - /// - /// 查找类似 检测到有新版本!是否更新? 的本地化字符串。 - /// - public string GrowlAsk => Lang.GrowlAsk; - - /// - /// 查找类似 消息通知示例 的本地化字符串。 - /// - public string GrowlDemo => Lang.GrowlDemo; - - /// - /// 查找类似 连接失败,请检查网络! 的本地化字符串。 - /// - public string GrowlError => Lang.GrowlError; - - /// - /// 查找类似 程序已崩溃~~~ 的本地化字符串。 - /// - public string GrowlFatal => Lang.GrowlFatal; - - /// - /// 查找类似 今天的天气不错~~~ 的本地化字符串。 - /// - public string GrowlInfo => Lang.GrowlInfo; - - /// - /// 查找类似 文件保存成功! 的本地化字符串。 - /// - public string GrowlSuccess => Lang.GrowlSuccess; - - /// - /// 查找类似 磁盘空间快要满了! 的本地化字符串。 - /// - public string GrowlWarning => Lang.GrowlWarning; - - /// - /// 查找类似 阴影画笔生成器 的本地化字符串。 - /// - public string HatchBrushGenerator => Lang.HatchBrushGenerator; - - /// - /// 查找类似 蜂窝布局 的本地化字符串。 - /// - public string HoneycombPanel => Lang.HoneycombPanel; - - /// - /// 查找类似 混合布局 的本地化字符串。 - /// - public string HybridLayout => Lang.HybridLayout; - - /// - /// 查找类似 忽略 的本地化字符串。 - /// - public string Ignore => Lang.Ignore; - - /// - /// 查找类似 图片块 的本地化字符串。 - /// - public string ImageBlock => Lang.ImageBlock; - - /// - /// 查找类似 图片浏览器 的本地化字符串。 - /// - public string ImageBrowser => Lang.ImageBrowser; - - /// - /// 查找类似 索引 的本地化字符串。 - /// - public string Index => Lang.Index; - - /// - /// 查找类似 信息 的本地化字符串。 - /// - public string Info => Lang.Info; - - /// - /// 查找类似 可交互对话框 的本地化字符串。 - /// - public string InteractiveDialog => Lang.InteractiveDialog; - - /// - /// 查找类似 不是手机号码 的本地化字符串。 - /// - public string IsNotPhone => Lang.IsNotPhone; - - /// - /// 查找类似 标签 的本地化字符串。 - /// - public string Label => Lang.Label; - - /// - /// 查找类似 查找类似 {0} 的本地化字符串。 的本地化字符串。 - /// - public string LangComment => Lang.LangComment; - - /// - /// 查找类似 列表框 的本地化字符串。 - /// - public string ListBox => Lang.ListBox; - - /// - /// 查找类似 列表视图 的本地化字符串。 - /// - public string ListView => Lang.ListView; - - /// - /// 查找类似 加载条 的本地化字符串。 - /// - public string Loading => Lang.Loading; - - /// - /// 查找类似 放大镜 的本地化字符串。 - /// - public string Magnifier => Lang.Magnifier; - - /// - /// 查找类似 菜单 的本地化字符串。 - /// - public string Menu => Lang.Menu; - - /// - /// 查找类似 消息框 的本地化字符串。 - /// - public string MessageBox => Lang.MessageBox; - - /// - /// 查找类似 的本地化字符串。 - /// - public string Morphing_Animation => Lang.Morphing_Animation; - - /// - /// 查找类似 名称 的本地化字符串。 - /// - public string Name => Lang.Name; - - /// - /// 查找类似 新建窗口 的本地化字符串。 - /// - public string NewWindow => Lang.NewWindow; - - /// - /// 查找类似 下一步 的本地化字符串。 - /// - public string Next => Lang.Next; - - /// - /// 查找类似 桌面通知 的本地化字符串。 - /// - public string Notification => Lang.Notification; - - /// - /// 查找类似 托盘图标 的本地化字符串。 - /// - public string NotifyIcon => Lang.NotifyIcon; - - /// - /// 查找类似 数值选择控件 的本地化字符串。 - /// - public string NumericUpDown => Lang.NumericUpDown; - - /// - /// 查找类似 关 的本地化字符串。 - /// - public string Off => Lang.Off; - - /// - /// 查找类似 确定 的本地化字符串。 - /// - public string Ok => Lang.Ok; - - /// - /// 查找类似 开 的本地化字符串。 - /// - public string On => Lang.On; - - /// - /// 查找类似 点击打开背景模糊窗口 的本地化字符串。 - /// - public string OpenBlurWindow => Lang.OpenBlurWindow; - - /// - /// 查找类似 点击打开常规窗口 的本地化字符串。 - /// - public string OpenCommonWindow => Lang.OpenCommonWindow; - - /// - /// 查找类似 点击打开自定义内容窗口 的本地化字符串。 - /// - public string OpenCustomContentWindow => Lang.OpenCustomContentWindow; - - /// - /// 查找类似 点击打开自定义消息窗口 的本地化字符串。 - /// - public string OpenCustomMessageWindow => Lang.OpenCustomMessageWindow; - - /// - /// 查找类似 点击打开自定义非客户端区域窗口 的本地化字符串。 - /// - public string OpenCustomNonClientAreaWindow => Lang.OpenCustomNonClientAreaWindow; - - /// - /// 查找类似 点击打开辉光窗口 的本地化字符串。 - /// - public string OpenGlowWindow => Lang.OpenGlowWindow; - - /// - /// 查找类似 点击打开图片浏览器 的本地化字符串。 - /// - public string OpenImageBrowser => Lang.OpenImageBrowser; - - /// - /// 查找类似 点击打开消息窗口 的本地化字符串。 - /// - public string OpenMessageWindow => Lang.OpenMessageWindow; - - /// - /// 查找类似 点击打开鼠标跟随窗口 的本地化字符串。 - /// - public string OpenMouseFollowWindow => Lang.OpenMouseFollowWindow; - - /// - /// 查找类似 点击打开原生常规窗口 的本地化字符串。 - /// - public string OpenNativeCommonWindow => Lang.OpenNativeCommonWindow; - - /// - /// 查找类似 点击打开导航窗口 的本地化字符串。 - /// - public string OpenNavigationWindow => Lang.OpenNavigationWindow; - - /// - /// 查找类似 打开无非客户端区域可拖拽窗口 的本地化字符串。 - /// - public string OpenNoNonClientAreaDragableWindow => Lang.OpenNoNonClientAreaDragableWindow; - - /// - /// 查找类似 打开面板 的本地化字符串。 - /// - public string OpenPanel => Lang.OpenPanel; - - /// - /// 查找类似 打开精灵 的本地化字符串。 - /// - public string OpenSprite => Lang.OpenSprite; - - /// - /// 查找类似 轮廓文本 的本地化字符串。 - /// - public string OutlineText => Lang.OutlineText; - - /// - /// 查找类似 页码条 的本地化字符串。 - /// - public string Pagination => Lang.Pagination; - - /// - /// 查找类似 密码框 的本地化字符串。 - /// - public string PasswordBox => Lang.PasswordBox; - - /// - /// 查找类似 PIN码框 的本地化字符串。 - /// - public string PinBox => Lang.PinBox; - - /// - /// 查找类似 请输入... 的本地化字符串。 - /// - public string PleaseInput => Lang.PleaseInput; - - /// - /// 查找类似 请稍后... 的本地化字符串。 - /// - public string PleaseWait => Lang.PleaseWait; - - /// - /// 查找类似 请输入内容 的本地化字符串。 - /// - public string PlsEnterContent => Lang.PlsEnterContent; - - /// - /// 查找类似 请输入邮箱 的本地化字符串。 - /// - public string PlsEnterEmail => Lang.PlsEnterEmail; - - /// - /// 查找类似 请输入关键字 的本地化字符串。 - /// - public string PlsEnterKey => Lang.PlsEnterKey; - - /// - /// 查找类似 气泡提示 的本地化字符串。 - /// - public string Poptip => Lang.Poptip; - - /// - /// 查找类似 上左;上边;上右;右上;右边;右下;下右;下边;下左;左下;左边;左上 的本地化字符串。 - /// - public string PoptipPositionStr => Lang.PoptipPositionStr; - - /// - /// 查找类似 实用例子 的本地化字符串。 - /// - public string PracticalDemos => Lang.PracticalDemos; - - /// - /// 查找类似 上一步 的本地化字符串。 - /// - public string Prev => Lang.Prev; - - /// - /// 查找类似 预览滑块 的本地化字符串。 - /// - public string PreviewSlider => Lang.PreviewSlider; - - /// - /// 查找类似 主要 的本地化字符串。 - /// - public string Primary => Lang.Primary; - - /// - /// 查找类似 进度条 的本地化字符串。 - /// - public string ProgressBar => Lang.ProgressBar; - - /// - /// 查找类似 进度按钮 的本地化字符串。 - /// - public string ProgressButton => Lang.ProgressButton; - - /// - /// 查找类似 项目 的本地化字符串。 - /// - public string Project => Lang.Project; - - /// - /// 查找类似 按住说话 的本地化字符串。 - /// - public string PushToTalk => Lang.PushToTalk; - - /// - /// 查找类似 QQ群 的本地化字符串。 - /// - public string QQGroup => Lang.QQGroup; - - /// - /// 查找类似 单选按钮 的本地化字符串。 - /// - public string RadioButton => Lang.RadioButton; - - /// - /// 查找类似 范围滑块 的本地化字符串。 - /// - public string RangeSlider => Lang.RangeSlider; - - /// - /// 查找类似 评分 的本地化字符串。 - /// - public string Rate => Lang.Rate; - - /// - /// 查找类似 群友推荐 的本地化字符串。 - /// - public string Recommendation => Lang.Recommendation; - - /// - /// 查找类似 注册 的本地化字符串。 - /// - public string Register => Lang.Register; - - /// - /// 查找类似 相对布局 的本地化字符串。 - /// - public string RelativePanel => Lang.RelativePanel; - - /// - /// 查找类似 备注 的本地化字符串。 - /// - public string Remark => Lang.Remark; - - /// - /// 查找类似 删除项 的本地化字符串。 - /// - public string RemoveItem => Lang.RemoveItem; - - /// - /// 查找类似 重复按钮 的本地化字符串。 - /// - public string RepeatButton => Lang.RepeatButton; - - /// - /// 查找类似 回复 的本地化字符串。 - /// - public string Reply => Lang.Reply; - - /// - /// 查找类似 代码仓库 的本地化字符串。 - /// - public string Repository => Lang.Repository; - - /// - /// 查找类似 响应式布局 的本地化字符串。 - /// - public string ResponsiveLayout => Lang.ResponsiveLayout; - - /// - /// 查找类似 富文本框 的本地化字符串。 - /// - public string RichTextBox => Lang.RichTextBox; - - /// - /// 查找类似 在这里右击 的本地化字符串。 - /// - public string RightClickHere => Lang.RightClickHere; - - /// - /// 查找类似 滚动块 的本地化字符串。 - /// - public string RunningBlock => Lang.RunningBlock; - - /// - /// 查找类似 截图 的本地化字符串。 - /// - public string Screenshot => Lang.Screenshot; - - /// - /// 查找类似 滚动视图 的本地化字符串。 - /// - public string ScrollViewer => Lang.ScrollViewer; - - /// - /// 查找类似 搜索栏 的本地化字符串。 - /// - public string SearchBar => Lang.SearchBar; - - /// - /// 查找类似 秒 的本地化字符串。 - /// - public string Second => Lang.Second; - - /// - /// 查找类似 选中 的本地化字符串。 - /// - public string Selected => Lang.Selected; - - /// - /// 查找类似 发送通知 的本地化字符串。 - /// - public string SendNotification => Lang.SendNotification; - - /// - /// 查找类似 徽章 的本地化字符串。 - /// - public string Shield => Lang.Shield; - - /// - /// 查找类似 在当前窗口显示 的本地化字符串。 - /// - public string ShowInCurrentWindow => Lang.ShowInCurrentWindow; - - /// - /// 查找类似 在主窗口显示 的本地化字符串。 - /// - public string ShowInMainWindow => Lang.ShowInMainWindow; - - /// - /// 查找类似 显示行号 的本地化字符串。 - /// - public string ShowRowNumber => Lang.ShowRowNumber; - - /// - /// 查找类似 侧边菜单 的本地化字符串。 - /// - public string SideMenu => Lang.SideMenu; - - /// - /// 查找类似 滑块 的本地化字符串。 - /// - public string Slider => Lang.Slider; - - /// - /// 查找类似 分割按钮 的本地化字符串。 - /// - public string SplitButton => Lang.SplitButton; - - /// - /// 查找类似 精灵 的本地化字符串。 - /// - public string Sprite => Lang.Sprite; - - /// - /// 查找类似 开始截图 的本地化字符串。 - /// - public string StartScreenshot => Lang.StartScreenshot; - - /// - /// 查找类似 保持打开 的本地化字符串。 - /// - public string StaysOpen => Lang.StaysOpen; - - /// - /// 查找类似 步骤 的本地化字符串。 - /// - public string Step => Lang.Step; - - /// - /// 查找类似 步骤条 的本地化字符串。 - /// - public string StepBar => Lang.StepBar; - - /// - /// 查找类似 样式模板 的本地化字符串。 - /// - public string Styles => Lang.Styles; - - /// - /// 查找类似 子标题 的本地化字符串。 - /// - public string SubTitle => Lang.SubTitle; - - /// - /// 查找类似 成功 的本地化字符串。 - /// - public string Success => Lang.Success; - - /// - /// 查找类似 选项卡控件 的本地化字符串。 - /// - public string TabControl => Lang.TabControl; - - /// - /// 查找类似 标签 的本地化字符串。 - /// - public string Tag => Lang.Tag; - - /// - /// 查找类似 正文 的本地化字符串。 - /// - public string Text => Lang.Text; - - /// - /// 查找类似 文本块 的本地化字符串。 - /// - public string TextBlock => Lang.TextBlock; - - /// - /// 查找类似 文本框 的本地化字符串。 - /// - public string TextBox => Lang.TextBox; - - /// - /// 查找类似 文本对话框 的本地化字符串。 - /// - public string TextDialog => Lang.TextDialog; - - /// - /// 查找类似 文本对话框(控件中) 的本地化字符串。 - /// - public string TextDialogInControl => Lang.TextDialogInControl; - - /// - /// 查找类似 文本对话框,带计时器 的本地化字符串。 - /// - public string TextDialogWithTimer => Lang.TextDialogWithTimer; - - /// - /// 查找类似 时间条 的本地化字符串。 - /// - public string TimeBar => Lang.TimeBar; - - /// - /// 查找类似 时间选择器 的本地化字符串。 - /// - public string TimePicker => Lang.TimePicker; - - /// - /// 查找类似 提示 的本地化字符串。 - /// - public string Tip => Lang.Tip; - - /// - /// 查找类似 标题 的本地化字符串。 - /// - public string Title => Lang.Title; - - /// - /// 查找类似 这是标题 的本地化字符串。 - /// - public string TitleDemoStr1 => Lang.TitleDemoStr1; - - /// - /// 查找类似 此项必填 的本地化字符串。 - /// - public string TitleDemoStr2 => Lang.TitleDemoStr2; - - /// - /// 查找类似 标题在左侧 的本地化字符串。 - /// - public string TitleDemoStr3 => Lang.TitleDemoStr3; - - /// - /// 查找类似 切换按钮 的本地化字符串。 - /// - public string ToggleButton => Lang.ToggleButton; - - /// - /// 查找类似 工具条 的本地化字符串。 - /// - public string ToolBar => Lang.ToolBar; - - /// - /// 查找类似 工具 的本地化字符串。 - /// - public string Tools => Lang.Tools; - - /// - /// 查找类似 穿梭框 的本地化字符串。 - /// - public string Transfer => Lang.Transfer; - - /// - /// 查找类似 内容过渡控件 的本地化字符串。 - /// - public string TransitioningContentControl => Lang.TransitioningContentControl; - - /// - /// 查找类似 树视图 的本地化字符串。 - /// - public string TreeView => Lang.TreeView; - - /// - /// 查找类似 试试关闭程序吧? 的本地化字符串。 - /// - public string Try2CloseApp => Lang.Try2CloseApp; - - /// - /// 查找类似 类型 的本地化字符串。 - /// - public string Type => Lang.Type; - - /// - /// 查找类似 上传文件 的本地化字符串。 - /// - public string UploadFile => Lang.UploadFile; - - /// - /// 查找类似 上传;上传中 的本地化字符串。 - /// - public string UploadStr => Lang.UploadStr; - - /// - /// 查找类似 可见性 的本地化字符串。 - /// - public string Visibility => Lang.Visibility; - - /// - /// 查找类似 VS 插件 的本地化字符串。 - /// - public string Vsix => Lang.Vsix; - - /// - /// 查找类似 警告 的本地化字符串。 - /// - public string Warning => Lang.Warning; - - /// - /// 查找类似 瀑布流 的本地化字符串。 - /// - public string WaterfallPanel => Lang.WaterfallPanel; - - /// - /// 查找类似 网站 的本地化字符串。 - /// - public string Website => Lang.Website; - - /// - /// 查找类似 窗口 的本地化字符串。 - /// - public string Window => Lang.Window; - - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void OnPropertyChanged(string propertyName) => - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } - - public class LangKeys - { - /// - /// 查找类似 关于 的本地化字符串。 - /// - public static string About = nameof(About); - - /// - /// 查找类似 添加项 的本地化字符串。 - /// - public static string AddItem = nameof(AddItem); - - /// - /// 查找类似 动画路径 的本地化字符串。 - /// - public static string AnimationPath = nameof(AnimationPath); - - /// - /// 查找类似 托盘图标已打开,将隐藏窗口而不是关闭程序 的本地化字符串。 - /// - public static string AppClosingTip = nameof(AppClosingTip); - - /// - /// 查找类似 询问 的本地化字符串。 - /// - public static string Ask = nameof(Ask); - - /// - /// 查找类似 标记 的本地化字符串。 - /// - public static string Badge = nameof(Badge); - - /// - /// 查找类似 填写基本信息 的本地化字符串。 - /// - public static string BasicInfo = nameof(BasicInfo); - - /// - /// 查找类似 基础布局 的本地化字符串。 - /// - public static string BasicLayout = nameof(BasicLayout); - - /// - /// 查找类似 闪烁 的本地化字符串。 - /// - public static string Blink = nameof(Blink); - - /// - /// 查找类似 博客 的本地化字符串。 - /// - public static string Blog = nameof(Blog); - - /// - /// 查找类似 边框 的本地化字符串。 - /// - public static string Border = nameof(Border); - - /// - /// 查找类似 画刷 的本地化字符串。 - /// - public static string Brush = nameof(Brush); - - /// - /// 查找类似 按钮 的本地化字符串。 - /// - public static string Button = nameof(Button); - - /// - /// 查找类似 自定义按钮 的本地化字符串。 - /// - public static string ButtonCustom = nameof(ButtonCustom); - - /// - /// 查找类似 按钮组 的本地化字符串。 - /// - public static string ButtonGroup = nameof(ButtonGroup); - - /// - /// 查找类似 日历 的本地化字符串。 - /// - public static string Calendar = nameof(Calendar); - - /// - /// 查找类似 带时钟的日历 的本地化字符串。 - /// - public static string CalendarWithClock = nameof(CalendarWithClock); - - /// - /// 查找类似 卡片 的本地化字符串。 - /// - public static string Card = nameof(Card); - - /// - /// 查找类似 轮播 的本地化字符串。 - /// - public static string Carousel = nameof(Carousel); - - /// - /// 查找类似 是否重启以更改语言? 的本地化字符串。 - /// - public static string ChangeLangAsk = nameof(ChangeLangAsk); - - /// - /// 查找类似 对话气泡 的本地化字符串。 - /// - public static string ChatBubble = nameof(ChatBubble); - - /// - /// 查找类似 讨论室 的本地化字符串。 - /// - public static string Chatroom = nameof(Chatroom); - - /// - /// 查找类似 复选框 的本地化字符串。 - /// - public static string CheckBox = nameof(CheckBox); - - /// - /// 查找类似 圆形布局 的本地化字符串。 - /// - public static string CirclePanel = nameof(CirclePanel); - - /// - /// 查找类似 清空 的本地化字符串。 - /// - public static string Clear = nameof(Clear); - - /// - /// 查找类似 点击计数 的本地化字符串。 - /// - public static string Click2Count = nameof(Click2Count); - - /// - /// 查找类似 时钟 的本地化字符串。 - /// - public static string Clock = nameof(Clock); - - /// - /// 查找类似 颜色拾取器 的本地化字符串。 - /// - public static string ColorPicker = nameof(ColorPicker); - - /// - /// 查找类似 分栏偏移 的本地化字符串。 - /// - public static string ColumnOffset = nameof(ColumnOffset); - - /// - /// 查找类似 分栏间隔 的本地化字符串。 - /// - public static string ColumnSpacing = nameof(ColumnSpacing); - - /// - /// 查找类似 组合框 的本地化字符串。 - /// - public static string ComboBox = nameof(ComboBox); - - /// - /// 查找类似 敬请期待 的本地化字符串。 - /// - public static string ComingSoon = nameof(ComingSoon); - - /// - /// 查找类似 评论 的本地化字符串。 - /// - public static string Comment = nameof(Comment); - - /// - /// 查找类似 一般 的本地化字符串。 - /// - public static string Common = nameof(Common); - - /// - /// 查找类似 对比滑块 的本地化字符串。 - /// - public static string CompareSlider = nameof(CompareSlider); - - /// - /// 查找类似 完成 的本地化字符串。 - /// - public static string Complete = nameof(Complete); - - /// - /// 查找类似 这是内容 的本地化字符串。 - /// - public static string ContentDemoStr = nameof(ContentDemoStr); - - /// - /// 查找类似 贡献者 的本地化字符串。 - /// - public static string Contributors = nameof(Contributors); - - /// - /// 查找类似 控件 的本地化字符串。 - /// - public static string Controls = nameof(Controls); - - /// - /// 查找类似 封面流 的本地化字符串。 - /// - public static string CoverFlow = nameof(CoverFlow); - - /// - /// 查找类似 封面视图 的本地化字符串。 - /// - public static string CoverView = nameof(CoverView); - - /// - /// 查找类似 危险 的本地化字符串。 - /// - public static string Danger = nameof(Danger); - - /// - /// 查找类似 数据表格 的本地化字符串。 - /// - public static string DataGrid = nameof(DataGrid); - - /// - /// 查找类似 日期选择器 的本地化字符串。 - /// - public static string DatePicker = nameof(DatePicker); - - /// - /// 查找类似 日期时间选择器 的本地化字符串。 - /// - public static string DateTimePicker = nameof(DateTimePicker); - - /// - /// 查找类似 默认 的本地化字符串。 - /// - public static string Default = nameof(Default); - - /// - /// 查找类似 示例 的本地化字符串。 - /// - public static string Demo = nameof(Demo); - - /// - /// 查找类似 对话框 的本地化字符串。 - /// - public static string Dialog = nameof(Dialog); - - /// - /// 查找类似 对话框示例 的本地化字符串。 - /// - public static string DialogDemo = nameof(DialogDemo); - - /// - /// 查找类似 分割线 的本地化字符串。 - /// - public static string Divider = nameof(Divider); - - /// - /// 查找类似 中文文档 的本地化字符串。 - /// - public static string Doc_cn = nameof(Doc_cn); - - /// - /// 查找类似 英文文档 的本地化字符串。 - /// - public static string Doc_en = nameof(Doc_en); - - /// - /// 查找类似 文献资料 的本地化字符串。 - /// - public static string Documentation = nameof(Documentation); - - /// - /// 查找类似 在这里拖拽 的本地化字符串。 - /// - public static string DragHere = nameof(DragHere); - - /// - /// 查找类似 抽屉 的本地化字符串。 - /// - public static string Drawer = nameof(Drawer); - - /// - /// 查找类似 效果 的本地化字符串。 - /// - public static string Effects = nameof(Effects); - - /// - /// 查找类似 邮箱 的本地化字符串。 - /// - public static string Email = nameof(Email); - - /// - /// 查找类似 错误 的本地化字符串。 - /// - public static string Error = nameof(Error); - - /// - /// 查找类似 退出 的本地化字符串。 - /// - public static string Exit = nameof(Exit); - - /// - /// 查找类似 展开框 的本地化字符串。 - /// - public static string Expander = nameof(Expander); - - /// - /// 查找类似 严重 的本地化字符串。 - /// - public static string Fatal = nameof(Fatal); - - /// - /// 查找类似 翻页时钟 的本地化字符串。 - /// - public static string FlipClock = nameof(FlipClock); - - /// - /// 查找类似 漂浮块 的本地化字符串。 - /// - public static string FloatingBlock = nameof(FloatingBlock); - - /// - /// 查找类似 流文档 的本地化字符串。 - /// - public static string FlowDocument = nameof(FlowDocument); - - /// - /// 查找类似 流文档单页视图 的本地化字符串。 - /// - public static string FlowDocumentPageViewer = nameof(FlowDocumentPageViewer); - - /// - /// 查找类似 流文档查看器 的本地化字符串。 - /// - public static string FlowDocumentReader = nameof(FlowDocumentReader); - - /// - /// 查找类似 流文档滚动视图 的本地化字符串。 - /// - public static string FlowDocumentScrollViewer = nameof(FlowDocumentScrollViewer); - - /// - /// 查找类似 导航框架 的本地化字符串。 - /// - public static string Frame = nameof(Frame); - - /// - /// 查找类似 Gif图片 的本地化字符串。 - /// - public static string GifImage = nameof(GifImage); - - /// - /// 查找类似 回到顶部 的本地化字符串。 - /// - public static string GotoTop = nameof(GotoTop); - - /// - /// 查找类似 头像 的本地化字符串。 - /// - public static string Gravatar = nameof(Gravatar); - - /// - /// 查找类似 栅格 的本地化字符串。 - /// - public static string Grid = nameof(Grid); - - /// - /// 查找类似 分组框 的本地化字符串。 - /// - public static string GroupBox = nameof(GroupBox); - - /// - /// 查找类似 组数 的本地化字符串。 - /// - public static string Groups = nameof(Groups); - - /// - /// 查找类似 信息通知 的本地化字符串。 - /// - public static string Growl = nameof(Growl); - - /// - /// 查找类似 检测到有新版本!是否更新? 的本地化字符串。 - /// - public static string GrowlAsk = nameof(GrowlAsk); - - /// - /// 查找类似 消息通知示例 的本地化字符串。 - /// - public static string GrowlDemo = nameof(GrowlDemo); - - /// - /// 查找类似 连接失败,请检查网络! 的本地化字符串。 - /// - public static string GrowlError = nameof(GrowlError); - - /// - /// 查找类似 程序已崩溃~~~ 的本地化字符串。 - /// - public static string GrowlFatal = nameof(GrowlFatal); - - /// - /// 查找类似 今天的天气不错~~~ 的本地化字符串。 - /// - public static string GrowlInfo = nameof(GrowlInfo); - - /// - /// 查找类似 文件保存成功! 的本地化字符串。 - /// - public static string GrowlSuccess = nameof(GrowlSuccess); - - /// - /// 查找类似 磁盘空间快要满了! 的本地化字符串。 - /// - public static string GrowlWarning = nameof(GrowlWarning); - - /// - /// 查找类似 阴影画笔生成器 的本地化字符串。 - /// - public static string HatchBrushGenerator = nameof(HatchBrushGenerator); - - /// - /// 查找类似 蜂窝布局 的本地化字符串。 - /// - public static string HoneycombPanel = nameof(HoneycombPanel); - - /// - /// 查找类似 混合布局 的本地化字符串。 - /// - public static string HybridLayout = nameof(HybridLayout); - - /// - /// 查找类似 忽略 的本地化字符串。 - /// - public static string Ignore = nameof(Ignore); - - /// - /// 查找类似 图片块 的本地化字符串。 - /// - public static string ImageBlock = nameof(ImageBlock); - - /// - /// 查找类似 图片浏览器 的本地化字符串。 - /// - public static string ImageBrowser = nameof(ImageBrowser); - - /// - /// 查找类似 索引 的本地化字符串。 - /// - public static string Index = nameof(Index); - - /// - /// 查找类似 信息 的本地化字符串。 - /// - public static string Info = nameof(Info); - - /// - /// 查找类似 可交互对话框 的本地化字符串。 - /// - public static string InteractiveDialog = nameof(InteractiveDialog); - - /// - /// 查找类似 不是手机号码 的本地化字符串。 - /// - public static string IsNotPhone = nameof(IsNotPhone); - - /// - /// 查找类似 标签 的本地化字符串。 - /// - public static string Label = nameof(Label); - - /// - /// 查找类似 查找类似 {0} 的本地化字符串。 的本地化字符串。 - /// - public static string LangComment = nameof(LangComment); - - /// - /// 查找类似 列表框 的本地化字符串。 - /// - public static string ListBox = nameof(ListBox); - - /// - /// 查找类似 列表视图 的本地化字符串。 - /// - public static string ListView = nameof(ListView); - - /// - /// 查找类似 加载条 的本地化字符串。 - /// - public static string Loading = nameof(Loading); - - /// - /// 查找类似 放大镜 的本地化字符串。 - /// - public static string Magnifier = nameof(Magnifier); - - /// - /// 查找类似 菜单 的本地化字符串。 - /// - public static string Menu = nameof(Menu); - - /// - /// 查找类似 消息框 的本地化字符串。 - /// - public static string MessageBox = nameof(MessageBox); - - /// - /// 查找类似 的本地化字符串。 - /// - public static string Morphing_Animation = nameof(Morphing_Animation); - - /// - /// 查找类似 名称 的本地化字符串。 - /// - public static string Name = nameof(Name); - - /// - /// 查找类似 新建窗口 的本地化字符串。 - /// - public static string NewWindow = nameof(NewWindow); - - /// - /// 查找类似 下一步 的本地化字符串。 - /// - public static string Next = nameof(Next); - - /// - /// 查找类似 桌面通知 的本地化字符串。 - /// - public static string Notification = nameof(Notification); - - /// - /// 查找类似 托盘图标 的本地化字符串。 - /// - public static string NotifyIcon = nameof(NotifyIcon); - - /// - /// 查找类似 数值选择控件 的本地化字符串。 - /// - public static string NumericUpDown = nameof(NumericUpDown); - - /// - /// 查找类似 关 的本地化字符串。 - /// - public static string Off = nameof(Off); - - /// - /// 查找类似 确定 的本地化字符串。 - /// - public static string Ok = nameof(Ok); - - /// - /// 查找类似 开 的本地化字符串。 - /// - public static string On = nameof(On); - - /// - /// 查找类似 点击打开背景模糊窗口 的本地化字符串。 - /// - public static string OpenBlurWindow = nameof(OpenBlurWindow); - - /// - /// 查找类似 点击打开常规窗口 的本地化字符串。 - /// - public static string OpenCommonWindow = nameof(OpenCommonWindow); - - /// - /// 查找类似 点击打开自定义内容窗口 的本地化字符串。 - /// - public static string OpenCustomContentWindow = nameof(OpenCustomContentWindow); - - /// - /// 查找类似 点击打开自定义消息窗口 的本地化字符串。 - /// - public static string OpenCustomMessageWindow = nameof(OpenCustomMessageWindow); - - /// - /// 查找类似 点击打开自定义非客户端区域窗口 的本地化字符串。 - /// - public static string OpenCustomNonClientAreaWindow = nameof(OpenCustomNonClientAreaWindow); - - /// - /// 查找类似 点击打开辉光窗口 的本地化字符串。 - /// - public static string OpenGlowWindow = nameof(OpenGlowWindow); - - /// - /// 查找类似 点击打开图片浏览器 的本地化字符串。 - /// - public static string OpenImageBrowser = nameof(OpenImageBrowser); - - /// - /// 查找类似 点击打开消息窗口 的本地化字符串。 - /// - public static string OpenMessageWindow = nameof(OpenMessageWindow); - - /// - /// 查找类似 点击打开鼠标跟随窗口 的本地化字符串。 - /// - public static string OpenMouseFollowWindow = nameof(OpenMouseFollowWindow); - - /// - /// 查找类似 点击打开原生常规窗口 的本地化字符串。 - /// - public static string OpenNativeCommonWindow = nameof(OpenNativeCommonWindow); - - /// - /// 查找类似 点击打开导航窗口 的本地化字符串。 - /// - public static string OpenNavigationWindow = nameof(OpenNavigationWindow); - - /// - /// 查找类似 打开无非客户端区域可拖拽窗口 的本地化字符串。 - /// - public static string OpenNoNonClientAreaDragableWindow = nameof(OpenNoNonClientAreaDragableWindow); - - /// - /// 查找类似 打开面板 的本地化字符串。 - /// - public static string OpenPanel = nameof(OpenPanel); - - /// - /// 查找类似 打开精灵 的本地化字符串。 - /// - public static string OpenSprite = nameof(OpenSprite); - - /// - /// 查找类似 轮廓文本 的本地化字符串。 - /// - public static string OutlineText = nameof(OutlineText); - - /// - /// 查找类似 页码条 的本地化字符串。 - /// - public static string Pagination = nameof(Pagination); - - /// - /// 查找类似 密码框 的本地化字符串。 - /// - public static string PasswordBox = nameof(PasswordBox); - - /// - /// 查找类似 PIN码框 的本地化字符串。 - /// - public static string PinBox = nameof(PinBox); - - /// - /// 查找类似 请输入... 的本地化字符串。 - /// - public static string PleaseInput = nameof(PleaseInput); - - /// - /// 查找类似 请稍后... 的本地化字符串。 - /// - public static string PleaseWait = nameof(PleaseWait); - - /// - /// 查找类似 请输入内容 的本地化字符串。 - /// - public static string PlsEnterContent = nameof(PlsEnterContent); - - /// - /// 查找类似 请输入邮箱 的本地化字符串。 - /// - public static string PlsEnterEmail = nameof(PlsEnterEmail); - - /// - /// 查找类似 请输入关键字 的本地化字符串。 - /// - public static string PlsEnterKey = nameof(PlsEnterKey); - - /// - /// 查找类似 气泡提示 的本地化字符串。 - /// - public static string Poptip = nameof(Poptip); - - /// - /// 查找类似 上左;上边;上右;右上;右边;右下;下右;下边;下左;左下;左边;左上 的本地化字符串。 - /// - public static string PoptipPositionStr = nameof(PoptipPositionStr); - - /// - /// 查找类似 实用例子 的本地化字符串。 - /// - public static string PracticalDemos = nameof(PracticalDemos); - - /// - /// 查找类似 上一步 的本地化字符串。 - /// - public static string Prev = nameof(Prev); - - /// - /// 查找类似 预览滑块 的本地化字符串。 - /// - public static string PreviewSlider = nameof(PreviewSlider); - - /// - /// 查找类似 主要 的本地化字符串。 - /// - public static string Primary = nameof(Primary); - - /// - /// 查找类似 进度条 的本地化字符串。 - /// - public static string ProgressBar = nameof(ProgressBar); - - /// - /// 查找类似 进度按钮 的本地化字符串。 - /// - public static string ProgressButton = nameof(ProgressButton); - - /// - /// 查找类似 项目 的本地化字符串。 - /// - public static string Project = nameof(Project); - - /// - /// 查找类似 按住说话 的本地化字符串。 - /// - public static string PushToTalk = nameof(PushToTalk); - - /// - /// 查找类似 QQ群 的本地化字符串。 - /// - public static string QQGroup = nameof(QQGroup); - - /// - /// 查找类似 单选按钮 的本地化字符串。 - /// - public static string RadioButton = nameof(RadioButton); - - /// - /// 查找类似 范围滑块 的本地化字符串。 - /// - public static string RangeSlider = nameof(RangeSlider); - - /// - /// 查找类似 评分 的本地化字符串。 - /// - public static string Rate = nameof(Rate); - - /// - /// 查找类似 群友推荐 的本地化字符串。 - /// - public static string Recommendation = nameof(Recommendation); - - /// - /// 查找类似 注册 的本地化字符串。 - /// - public static string Register = nameof(Register); - - /// - /// 查找类似 相对布局 的本地化字符串。 - /// - public static string RelativePanel = nameof(RelativePanel); - - /// - /// 查找类似 备注 的本地化字符串。 - /// - public static string Remark = nameof(Remark); - - /// - /// 查找类似 删除项 的本地化字符串。 - /// - public static string RemoveItem = nameof(RemoveItem); - - /// - /// 查找类似 重复按钮 的本地化字符串。 - /// - public static string RepeatButton = nameof(RepeatButton); - - /// - /// 查找类似 回复 的本地化字符串。 - /// - public static string Reply = nameof(Reply); - - /// - /// 查找类似 代码仓库 的本地化字符串。 - /// - public static string Repository = nameof(Repository); - - /// - /// 查找类似 响应式布局 的本地化字符串。 - /// - public static string ResponsiveLayout = nameof(ResponsiveLayout); - - /// - /// 查找类似 富文本框 的本地化字符串。 - /// - public static string RichTextBox = nameof(RichTextBox); - - /// - /// 查找类似 在这里右击 的本地化字符串。 - /// - public static string RightClickHere = nameof(RightClickHere); - - /// - /// 查找类似 滚动块 的本地化字符串。 - /// - public static string RunningBlock = nameof(RunningBlock); - - /// - /// 查找类似 截图 的本地化字符串。 - /// - public static string Screenshot = nameof(Screenshot); - - /// - /// 查找类似 滚动视图 的本地化字符串。 - /// - public static string ScrollViewer = nameof(ScrollViewer); - - /// - /// 查找类似 搜索栏 的本地化字符串。 - /// - public static string SearchBar = nameof(SearchBar); - - /// - /// 查找类似 秒 的本地化字符串。 - /// - public static string Second = nameof(Second); - - /// - /// 查找类似 选中 的本地化字符串。 - /// - public static string Selected = nameof(Selected); - - /// - /// 查找类似 发送通知 的本地化字符串。 - /// - public static string SendNotification = nameof(SendNotification); - - /// - /// 查找类似 徽章 的本地化字符串。 - /// - public static string Shield = nameof(Shield); - - /// - /// 查找类似 在当前窗口显示 的本地化字符串。 - /// - public static string ShowInCurrentWindow = nameof(ShowInCurrentWindow); - - /// - /// 查找类似 在主窗口显示 的本地化字符串。 - /// - public static string ShowInMainWindow = nameof(ShowInMainWindow); - - /// - /// 查找类似 显示行号 的本地化字符串。 - /// - public static string ShowRowNumber = nameof(ShowRowNumber); - - /// - /// 查找类似 侧边菜单 的本地化字符串。 - /// - public static string SideMenu = nameof(SideMenu); - - /// - /// 查找类似 滑块 的本地化字符串。 - /// - public static string Slider = nameof(Slider); - - /// - /// 查找类似 分割按钮 的本地化字符串。 - /// - public static string SplitButton = nameof(SplitButton); - - /// - /// 查找类似 精灵 的本地化字符串。 - /// - public static string Sprite = nameof(Sprite); - - /// - /// 查找类似 开始截图 的本地化字符串。 - /// - public static string StartScreenshot = nameof(StartScreenshot); - - /// - /// 查找类似 保持打开 的本地化字符串。 - /// - public static string StaysOpen = nameof(StaysOpen); - - /// - /// 查找类似 步骤 的本地化字符串。 - /// - public static string Step = nameof(Step); - - /// - /// 查找类似 步骤条 的本地化字符串。 - /// - public static string StepBar = nameof(StepBar); - - /// - /// 查找类似 样式模板 的本地化字符串。 - /// - public static string Styles = nameof(Styles); - - /// - /// 查找类似 子标题 的本地化字符串。 - /// - public static string SubTitle = nameof(SubTitle); - - /// - /// 查找类似 成功 的本地化字符串。 - /// - public static string Success = nameof(Success); - - /// - /// 查找类似 选项卡控件 的本地化字符串。 - /// - public static string TabControl = nameof(TabControl); - - /// - /// 查找类似 标签 的本地化字符串。 - /// - public static string Tag = nameof(Tag); - - /// - /// 查找类似 正文 的本地化字符串。 - /// - public static string Text = nameof(Text); - - /// - /// 查找类似 文本块 的本地化字符串。 - /// - public static string TextBlock = nameof(TextBlock); - - /// - /// 查找类似 文本框 的本地化字符串。 - /// - public static string TextBox = nameof(TextBox); - - /// - /// 查找类似 文本对话框 的本地化字符串。 - /// - public static string TextDialog = nameof(TextDialog); - - /// - /// 查找类似 文本对话框(控件中) 的本地化字符串。 - /// - public static string TextDialogInControl = nameof(TextDialogInControl); - - /// - /// 查找类似 文本对话框,带计时器 的本地化字符串。 - /// - public static string TextDialogWithTimer = nameof(TextDialogWithTimer); - - /// - /// 查找类似 时间条 的本地化字符串。 - /// - public static string TimeBar = nameof(TimeBar); - - /// - /// 查找类似 时间选择器 的本地化字符串。 - /// - public static string TimePicker = nameof(TimePicker); - - /// - /// 查找类似 提示 的本地化字符串。 - /// - public static string Tip = nameof(Tip); - - /// - /// 查找类似 标题 的本地化字符串。 - /// - public static string Title = nameof(Title); - - /// - /// 查找类似 这是标题 的本地化字符串。 - /// - public static string TitleDemoStr1 = nameof(TitleDemoStr1); - - /// - /// 查找类似 此项必填 的本地化字符串。 - /// - public static string TitleDemoStr2 = nameof(TitleDemoStr2); - - /// - /// 查找类似 标题在左侧 的本地化字符串。 - /// - public static string TitleDemoStr3 = nameof(TitleDemoStr3); - - /// - /// 查找类似 切换按钮 的本地化字符串。 - /// - public static string ToggleButton = nameof(ToggleButton); - - /// - /// 查找类似 工具条 的本地化字符串。 - /// - public static string ToolBar = nameof(ToolBar); - - /// - /// 查找类似 工具 的本地化字符串。 - /// - public static string Tools = nameof(Tools); - - /// - /// 查找类似 穿梭框 的本地化字符串。 - /// - public static string Transfer = nameof(Transfer); - - /// - /// 查找类似 内容过渡控件 的本地化字符串。 - /// - public static string TransitioningContentControl = nameof(TransitioningContentControl); - - /// - /// 查找类似 树视图 的本地化字符串。 - /// - public static string TreeView = nameof(TreeView); - - /// - /// 查找类似 试试关闭程序吧? 的本地化字符串。 - /// - public static string Try2CloseApp = nameof(Try2CloseApp); - - /// - /// 查找类似 类型 的本地化字符串。 - /// - public static string Type = nameof(Type); - - /// - /// 查找类似 上传文件 的本地化字符串。 - /// - public static string UploadFile = nameof(UploadFile); - - /// - /// 查找类似 上传;上传中 的本地化字符串。 - /// - public static string UploadStr = nameof(UploadStr); - - /// - /// 查找类似 可见性 的本地化字符串。 - /// - public static string Visibility = nameof(Visibility); - - /// - /// 查找类似 VS 插件 的本地化字符串。 - /// - public static string Vsix = nameof(Vsix); - - /// - /// 查找类似 警告 的本地化字符串。 - /// - public static string Warning = nameof(Warning); - - /// - /// 查找类似 瀑布流 的本地化字符串。 - /// - public static string WaterfallPanel = nameof(WaterfallPanel); - - /// - /// 查找类似 网站 的本地化字符串。 - /// - public static string Website = nameof(Website); - - /// - /// 查找类似 窗口 的本地化字符串。 - /// - public static string Window = nameof(Window); - - } -} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Tools/HighlightingProvider.cs b/src/Shared/HandyControlDemo_Shared/Tools/HighlightingProvider.cs index 078ea8de4..3eea3f728 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/HighlightingProvider.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/HighlightingProvider.cs @@ -10,7 +10,9 @@ namespace HandyControlDemo.Tools; internal class HighlightingProvider { - public static HighlightingProvider Default = new Lazy(() => new HighlightingProvider()).Value; + private static readonly Lazy DefaultInternal = new(() => new HighlightingProvider()); + + public static HighlightingProvider Default => DefaultInternal.Value; protected static readonly Lazy DefaultDefinition = new(() => HighlightingManager.Instance.GetDefinition("C#")); diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml index a93f88f5c..5348d5b07 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml @@ -44,7 +44,7 @@ - + diff --git a/src/Shared/HandyControlDemo_Shared/ViewModel/ViewModelLocator.cs b/src/Shared/HandyControlDemo_Shared/ViewModel/ViewModelLocator.cs index 761e2eaa5..7b4ed0b5a 100644 --- a/src/Shared/HandyControlDemo_Shared/ViewModel/ViewModelLocator.cs +++ b/src/Shared/HandyControlDemo_Shared/ViewModel/ViewModelLocator.cs @@ -8,6 +8,11 @@ namespace HandyControlDemo.ViewModel; public class ViewModelLocator { + private static readonly Lazy InstanceInternal = new(() => + Application.Current.TryFindResource("Locator") as ViewModelLocator, isThreadSafe: true); + + public static ViewModelLocator Instance => InstanceInternal.Value; + public ViewModelLocator() { SimpleIoc.Default.Register(); @@ -41,9 +46,6 @@ public ViewModelLocator() SimpleIoc.Default.Register(); } - public static ViewModelLocator Instance = new Lazy(() => - Application.Current.TryFindResource("Locator") as ViewModelLocator).Value; - #region Vm public MainViewModel Main => SimpleIoc.Default.GetInstance(); diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TabControlBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TabControlBaseStyle.xaml index 2fce1d001..e0a11c2fe 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TabControlBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TabControlBaseStyle.xaml @@ -84,8 +84,8 @@ - - + + diff --git a/src/Shared/HandyControl_Shared/Tools/Helper/ConfigHelper.cs b/src/Shared/HandyControl_Shared/Tools/Helper/ConfigHelper.cs index aab7503a5..41ae77708 100644 --- a/src/Shared/HandyControl_Shared/Tools/Helper/ConfigHelper.cs +++ b/src/Shared/HandyControl_Shared/Tools/Helper/ConfigHelper.cs @@ -20,7 +20,9 @@ private ConfigHelper() } - public static ConfigHelper Instance = new Lazy(() => new ConfigHelper()).Value; + private static readonly Lazy InstanceInternal = new(() => new ConfigHelper(), isThreadSafe: true); + + public static ConfigHelper Instance => InstanceInternal.Value; private XmlLanguage _lang = XmlLanguage.GetLanguage("zh-cn"); From 40bb60164ede75246e9b1d34da2e538d8560cc63 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Wed, 17 Jul 2024 22:56:54 +0800 Subject: [PATCH 4/9] chore: add avalonia button and brush demo. --- .../HandyControlDemo_Avalonia/App.axaml.cs | 6 +- .../Data/DemoInfo.json | 2 +- .../HandyControlDemo_Avalonia.csproj | 4 + .../UserControl/Main/LeftMainContent.axaml | 93 +++-- .../UserControl/Styles/BrushDemoCtl.axaml | 117 ++++++ .../UserControl/Styles/BrushDemoCtl.axaml.cs | 9 + .../UserControl/Styles/ButtonDemoCtl.axaml | 83 +++- .../ViewModel/Main/MainViewModel.cs | 4 +- .../Controls/Panel/UniformSpacingPanel.cs | 373 ++++++++++++++++++ .../Data/Enum/VisualWrapping.cs | 7 + .../HandyControl_Avalonia/Data/PanelUvSize.cs | 69 ++++ .../HandyControl_Avalonia.csproj | 5 +- .../Themes/Styles/Button.axaml | 177 ++++----- .../Themes/Styles/Label.axaml | 94 +++++ .../Themes/Styles/ListBox.axaml | 2 + .../Themes/Styles/ListBoxItem.axaml | 26 +- .../Themes/Styles/Style.axaml | 1 + .../Themes/Styles/TabControl.axaml | 62 +-- .../Themes/Styles/TabItem.axaml | 55 +-- .../Themes/Styles/Window.axaml | 2 +- .../Tools/Helper/MathHelper.cs | 16 + .../HandyControl_Net_40/Themes/Theme.xaml | 4 +- .../Controls/Panel/UniformSpacingPanel.cs | 104 +++-- 23 files changed, 1021 insertions(+), 294 deletions(-) create mode 100644 src/Avalonia/HandyControlDemo_Avalonia/UserControl/Styles/BrushDemoCtl.axaml create mode 100644 src/Avalonia/HandyControlDemo_Avalonia/UserControl/Styles/BrushDemoCtl.axaml.cs create mode 100644 src/Avalonia/HandyControl_Avalonia/Controls/Panel/UniformSpacingPanel.cs create mode 100644 src/Avalonia/HandyControl_Avalonia/Data/Enum/VisualWrapping.cs create mode 100644 src/Avalonia/HandyControl_Avalonia/Data/PanelUvSize.cs create mode 100644 src/Avalonia/HandyControl_Avalonia/Themes/Styles/Label.axaml create mode 100644 src/Avalonia/HandyControl_Avalonia/Tools/Helper/MathHelper.cs diff --git a/src/Avalonia/HandyControlDemo_Avalonia/App.axaml.cs b/src/Avalonia/HandyControlDemo_Avalonia/App.axaml.cs index 1bb6fd369..74902c4b9 100644 --- a/src/Avalonia/HandyControlDemo_Avalonia/App.axaml.cs +++ b/src/Avalonia/HandyControlDemo_Avalonia/App.axaml.cs @@ -1,4 +1,5 @@ -using Avalonia; +using System.Globalization; +using Avalonia; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Data.Core.Plugins; using Avalonia.Markup.Xaml; @@ -6,7 +7,7 @@ namespace HandyControlDemo; -public partial class App : Application +public class App : Application { public override void Initialize() { @@ -15,6 +16,7 @@ public override void Initialize() public override void OnFrameworkInitializationCompleted() { + Properties.Langs.Lang.Culture = new CultureInfo("en"); BindingPlugins.DataValidators.RemoveAt(0); if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Data/DemoInfo.json b/src/Avalonia/HandyControlDemo_Avalonia/Data/DemoInfo.json index b2f688de9..75d68c351 100644 --- a/src/Avalonia/HandyControlDemo_Avalonia/Data/DemoInfo.json +++ b/src/Avalonia/HandyControlDemo_Avalonia/Data/DemoInfo.json @@ -1,7 +1,7 @@ [ { "title": "Styles", - "selectedIndex": 0, + "selectedIndex": -1, "group": false, "demoItemList": [ [ "Brush", "BrushDemoCtl", "Brush.Brush", "", "" ], diff --git a/src/Avalonia/HandyControlDemo_Avalonia/HandyControlDemo_Avalonia.csproj b/src/Avalonia/HandyControlDemo_Avalonia/HandyControlDemo_Avalonia.csproj index 53ad41f1b..eeae15a11 100644 --- a/src/Avalonia/HandyControlDemo_Avalonia/HandyControlDemo_Avalonia.csproj +++ b/src/Avalonia/HandyControlDemo_Avalonia/HandyControlDemo_Avalonia.csproj @@ -57,6 +57,10 @@ ButtonDemoCtrl.axaml + + BoderDemoCtl.axaml + Code + diff --git a/src/Avalonia/HandyControlDemo_Avalonia/UserControl/Main/LeftMainContent.axaml b/src/Avalonia/HandyControlDemo_Avalonia/UserControl/Main/LeftMainContent.axaml index 67246a934..7bbdd25a4 100644 --- a/src/Avalonia/HandyControlDemo_Avalonia/UserControl/Main/LeftMainContent.axaml +++ b/src/Avalonia/HandyControlDemo_Avalonia/UserControl/Main/LeftMainContent.axaml @@ -6,46 +6,55 @@ Margin="16,16,0,16" CornerRadius="10" Effect="{StaticResource EffectShadow4}"> - - - - - - - - - - - - - - - - - - - - - - - - + +