support for dynamic switching languages
This commit is contained in:
1 parent
7a39b18f0b
commit
95f35c7366
89 files changed
+3697
-549
No files matched your search
@@ -6,7 +6,8 @@
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
mc:Ignorable="d"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Title="{x:Static langs:Lang.About}"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.About}}"
|
||||
ShowTitle="True"
|
||||
BorderThickness="1"
|
||||
BorderBrush="#262e2f"
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
mc:Ignorable="d"
|
||||
OtherButtonForeground="{DynamicResource ReverseTextBrush}"
|
||||
@@ -13,7 +14,7 @@
|
||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ShowTitle="False"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800">
|
||||
<hc:Window.NonClientAreaContent>
|
||||
|
||||
@@ -3,16 +3,17 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
hc:Dialog.Token="{x:Static data:MessageToken.DialogDemoWindow}"
|
||||
DataContext="{Binding DialogDemo,Source={StaticResource Locator}}"
|
||||
Title="{x:Static langs:Lang.DialogDemo}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.DialogDemo}}"
|
||||
Width="800"
|
||||
Height="500">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<Button Content="{x:Static langs:Lang.ShowInCurrentWindow}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{x:Static data:MessageToken.DialogDemoWindow}"/>
|
||||
<Button Margin="0,10,0,0" Content="{x:Static langs:Lang.ShowInMainWindow}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{x:Static data:MessageToken.MainWindow}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.ShowInCurrentWindow}}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{x:Static data:MessageToken.DialogDemoWindow}"/>
|
||||
<Button Margin="0,10,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.ShowInMainWindow}}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{x:Static data:MessageToken.MainWindow}"/>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</Window>
|
||||
@@ -5,10 +5,11 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
ActiveGlowColor="{DynamicResource PrimaryColor}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
|
||||
@@ -3,21 +3,22 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
DataContext="{Binding GrowlDemoWithToken,Source={StaticResource Locator}}"
|
||||
Title="{x:Static langs:Lang.GrowlDemo}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.GrowlDemo}}"
|
||||
Width="800"
|
||||
Height="500">
|
||||
<hc:TransitioningContentControl>
|
||||
<hc:SimplePanel Margin="32">
|
||||
<WrapPanel>
|
||||
<Button Command="{Binding InfoCmd}" Content="{x:Static langs:Lang.Info}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{x:Static langs:Lang.Error}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{x:Static langs:Lang.Ask}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button Command="{Binding InfoCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Error}}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Ask}}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Fatal}}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Clear}}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
<hc:ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsInertiaEnabled="True" IsPenetrating="True">
|
||||
<StackPanel hc:Growl.Token="{x:Static data:MessageToken.GrowlDemoPanel}" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ShowTitle="True"
|
||||
@@ -16,7 +17,7 @@
|
||||
<hc:SimplePanel>
|
||||
<Rectangle VerticalAlignment="Top" Margin="10" Height="30" RadiusX="4" RadiusY="4" Stroke="{DynamicResource BorderBrush}" StrokeDashArray="2,2"/>
|
||||
<Border hc:WindowAttach.IsDragElement="True" VerticalAlignment="Top" Margin="11" Height="28" Background="{DynamicResource DarkDefaultBrush}" CornerRadius="4">
|
||||
<TextBlock Text="{x:Static langs:Lang.DragHere}" Style="{StaticResource TextBlockDefault}"/>
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.DragHere}}" Style="{StaticResource TextBlockDefault}"/>
|
||||
</Border>
|
||||
<Button Click="ButtonClose_OnClick" HorizontalAlignment="Right" Margin="0,15,15,0" VerticalAlignment="Top" Padding="0" Height="20" Width="20" Style="{StaticResource ButtonPrimary}" hc:IconElement.Geometry="{StaticResource CloseGeometry}" hc:BorderElement.CornerRadius="15"/>
|
||||
</hc:SimplePanel>
|
||||
|
||||
Reference in new issue
Block a user