support for dynamic switching languages

This commit is contained in:
NaBian committed 2020-04-17 01:23:04 +08:00
1 parent 7a39b18f0b
commit 95f35c7366
89 files changed
+3697 -549

No files matched your search

@@ -3,37 +3,38 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<UniformGrid Margin="32,32,0,0" Columns="3" Rows="2">
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow1}">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow2}">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow3}">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow4}">
<Border Background="{DynamicResource AccentBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow5}">
<Border Background="{DynamicResource BorderBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Border>
</UniformGrid>
@@ -3,38 +3,39 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:ScrollViewer IsInertiaEnabled="True">
<StackPanel Margin="32">
<WrapPanel ItemWidth="160" ItemHeight="130">
<StackPanel>
<Button Content="{x:Static langs:Lang.Default}" Margin="5"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Default}" Margin="5"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Default}}" Margin="5"/>
<Button IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Default}}" Margin="5"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ButtonPrimary}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ButtonPrimary}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Primary}}" Margin="5" Style="{StaticResource ButtonPrimary}"/>
<Button IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Primary}}" Margin="5" Style="{StaticResource ButtonPrimary}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonPrimary"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
<Button IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonSuccess"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ButtonInfo}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ButtonInfo}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="5" Style="{StaticResource ButtonInfo}"/>
<Button IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="5" Style="{StaticResource ButtonInfo}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonInfo"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource ButtonWarning}"/>
<Button IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource ButtonWarning}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonWarning"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ButtonDanger}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ButtonDanger}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Danger}}" Margin="5" Style="{StaticResource ButtonDanger}"/>
<Button IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Danger}}" Margin="5" Style="{StaticResource ButtonDanger}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonDanger"/>
</StackPanel>
</WrapPanel>
@@ -45,13 +46,13 @@
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="Default(DeleteGeometry)"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Clock}" Margin="5" Style="{StaticResource ButtonPrimary}" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<Button Content="{x:Static langs:Lang.Clock}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonPrimary}" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" Margin="5" Style="{StaticResource ButtonPrimary}" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonPrimary}" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonPrimary(ClockGeometry)"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Calendar}" Margin="5" Style="{StaticResource ButtonSuccess}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<Button Content="{x:Static langs:Lang.Calendar}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonSuccess}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" Margin="5" Style="{StaticResource ButtonSuccess}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonSuccess}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonSuccess(CalendarGeometry)"/>
</StackPanel>
<StackPanel>
@@ -72,8 +73,8 @@
</WrapPanel>
<WrapPanel ItemWidth="160" ItemHeight="130">
<StackPanel>
<Button Margin="5" Height="28" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonCustom}" Style="{StaticResource ButtonCustom}" hc:BackgroundSwitchElement.MouseHoverBackground="Red" hc:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<Button Margin="5" Height="28" IsEnabled="False" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonCustom}" Style="{StaticResource ButtonCustom}" hc:BackgroundSwitchElement.MouseHoverBackground="Red" hc:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<Button Margin="5" Height="28" Padding="10,0" Background="#24292e" Foreground="White" Content="{ex:Lang Key={x:Static langs:LangKeys.ButtonCustom}}" Style="{StaticResource ButtonCustom}" hc:BackgroundSwitchElement.MouseHoverBackground="Red" hc:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<Button Margin="5" Height="28" IsEnabled="False" Padding="10,0" Background="#24292e" Foreground="White" Content="{ex:Lang Key={x:Static langs:LangKeys.ButtonCustom}}" Style="{StaticResource ButtonCustom}" hc:BackgroundSwitchElement.MouseHoverBackground="Red" hc:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonCustom"/>
</StackPanel>
<StackPanel>
@@ -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"
Background="{DynamicResource RegionBrush}"
Width="400">
<hc:TransitioningContentControl>
<StackPanel Margin="32" HorizontalAlignment="Center" VerticalAlignment="Center">
<CheckBox Content="{x:Static langs:Lang.CheckBox}" IsChecked="True"/>
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}" IsChecked="True" IsEnabled="False"/>
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}"/>
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}" IsEnabled="False"/>
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}" IsChecked="{x:Null}"/>
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}" IsChecked="{x:Null}" IsEnabled="False"/>
<CheckBox Content="{ex:Lang Key={x:Static langs:LangKeys.CheckBox}}" IsChecked="True"/>
<CheckBox Margin="0,16,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.CheckBox}}" IsChecked="True" IsEnabled="False"/>
<CheckBox Margin="0,16,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.CheckBox}}"/>
<CheckBox Margin="0,16,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.CheckBox}}" IsEnabled="False"/>
<CheckBox Margin="0,16,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.CheckBox}}" IsChecked="{x:Null}"/>
<CheckBox Margin="0,16,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.CheckBox}}" IsChecked="{x:Null}" IsEnabled="False"/>
</StackPanel>
</hc:TransitioningContentControl>
</UserControl>
@@ -4,10 +4,11 @@
Background="{DynamicResource RegionBrush}"
MaxWidth="800"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<TabControl Style="{StaticResource TabControlInLine}">
<TabItem Header="{x:Static langs:Lang.Common}">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Common}}">
<DataGrid HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
<DataGrid.RowHeaderTemplate>
<DataTemplate>
@@ -15,7 +16,7 @@
</DataTemplate>
</DataGrid.RowHeaderTemplate>
<DataGrid.Columns>
<DataGridTextColumn IsReadOnly="True" Width="80" CanUserResize="False" Binding="{Binding Index}" Header="{x:Static langs:Lang.Index}"/>
<DataGridTextColumn IsReadOnly="True" Width="80" CanUserResize="False" Binding="{Binding Index}" Header="{ex:Lang Key={x:Static langs:LangKeys.Index}}"/>
<DataGridTemplateColumn Width="60" CanUserResize="False">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
@@ -23,14 +24,14 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding Name}" Header="{x:Static langs:Lang.Name}"/>
<DataGridCheckBoxColumn Width="100" CanUserResize="False" Binding="{Binding IsSelected}" Header="{x:Static langs:Lang.Selected}"/>
<DataGridComboBoxColumn ItemsSource="{Binding Source={StaticResource DemoTypes}}" Width="100" CanUserResize="False" SelectedValueBinding="{Binding Type}" Header="{x:Static langs:Lang.Type}"/>
<DataGridTextColumn Binding="{Binding Remark}" Header="{x:Static langs:Lang.Remark}"/>
<DataGridTextColumn Binding="{Binding Name}" Header="{ex:Lang Key={x:Static langs:LangKeys.Name}}"/>
<DataGridCheckBoxColumn Width="100" CanUserResize="False" Binding="{Binding IsSelected}" Header="{ex:Lang Key={x:Static langs:LangKeys.Selected}}"/>
<DataGridComboBoxColumn ItemsSource="{Binding Source={StaticResource DemoTypes}}" Width="100" CanUserResize="False" SelectedValueBinding="{Binding Type}" Header="{ex:Lang Key={x:Static langs:LangKeys.Type}}"/>
<DataGridTextColumn Binding="{Binding Remark}" Header="{ex:Lang Key={x:Static langs:LangKeys.Remark}}"/>
</DataGrid.Columns>
</DataGrid>
</TabItem>
<TabItem Header="{x:Static langs:Lang.ShowRowNumber}">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.ShowRowNumber}}">
<DataGrid HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataList}" hc:DataGridAttach.ShowRowNumber="True">
<DataGrid.Columns>
<DataGridTemplateColumn Width="60" CanUserResize="False">
@@ -40,10 +41,10 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding Name}" Header="{x:Static langs:Lang.Name}"/>
<DataGridCheckBoxColumn Width="100" CanUserResize="False" Binding="{Binding IsSelected}" Header="{x:Static langs:Lang.Selected}"/>
<DataGridComboBoxColumn ItemsSource="{Binding Source={StaticResource DemoTypes}}" Width="100" CanUserResize="False" SelectedValueBinding="{Binding Type}" Header="{x:Static langs:Lang.Type}"/>
<DataGridTextColumn Binding="{Binding Remark}" Header="{x:Static langs:Lang.Remark}"/>
<DataGridTextColumn Binding="{Binding Name}" Header="{ex:Lang Key={x:Static langs:LangKeys.Name}}"/>
<DataGridCheckBoxColumn Width="100" CanUserResize="False" Binding="{Binding IsSelected}" Header="{ex:Lang Key={x:Static langs:LangKeys.Selected}}"/>
<DataGridComboBoxColumn ItemsSource="{Binding Source={StaticResource DemoTypes}}" Width="100" CanUserResize="False" SelectedValueBinding="{Binding Type}" Header="{ex:Lang Key={x:Static langs:LangKeys.Type}}"/>
<DataGridTextColumn Binding="{Binding Remark}" Header="{ex:Lang Key={x:Static langs:LangKeys.Remark}}"/>
</DataGrid.Columns>
</DataGrid>
</TabItem>
@@ -3,19 +3,20 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="{DynamicResource RegionBrush}"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<StackPanel Margin="32" VerticalAlignment="Center" Width="240">
<Expander Header="{x:Static langs:Lang.Title}">
<Expander Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
<Border Height="100" BorderThickness="1,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource SecondaryRegionBrush}" CornerRadius="0,0,4,4"/>
</Expander>
<Expander Margin="0,4,0,0" Header="{x:Static langs:Lang.Title}">
<Expander Margin="0,4,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
<Border Height="100" BorderThickness="1,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource SecondaryRegionBrush}" CornerRadius="0,0,4,4"/>
</Expander>
<Expander Margin="0,4,0,0" Header="{x:Static langs:Lang.Title}">
<Expander Margin="0,4,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
<Border Height="100" BorderThickness="1,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource SecondaryRegionBrush}" CornerRadius="0,0,4,4"/>
</Expander>
<Expander Margin="0,4,0,0" Header="{x:Static langs:Lang.Title}">
<Expander Margin="0,4,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
<Border Height="100" BorderThickness="1,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource SecondaryRegionBrush}" CornerRadius="0,0,4,4"/>
</Expander>
</StackPanel>
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<UserControl.Resources>
<FlowDocument x:Key="FlowDocumentDemo" x:Shared="False" ColumnWidth="400" IsOptimalParagraphEnabled="True" IsHyphenationEnabled="True">
@@ -99,13 +100,13 @@
</UserControl.Resources>
<hc:TransitioningContentControl>
<TabControl Style="{StaticResource TabControlInLine}">
<TabItem Header="{x:Static langs:Lang.FlowDocumentScrollViewer}">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.FlowDocumentScrollViewer}}">
<FlowDocumentScrollViewer Document="{StaticResource FlowDocumentDemo}" IsToolBarVisible="True" Width="640" Height="400" Margin="32"/>
</TabItem>
<TabItem Header="{x:Static langs:Lang.FlowDocumentPageViewer}">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.FlowDocumentPageViewer}}">
<FlowDocumentPageViewer Document="{StaticResource FlowDocumentDemo}" Width="640" Height="400" Margin="32"/>
</TabItem>
<TabItem Header="{x:Static langs:Lang.FlowDocumentReader}">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.FlowDocumentReader}}">
<FlowDocumentReader Document="{StaticResource FlowDocumentDemo}" Width="640" Height="400" Margin="32"/>
</TabItem>
</TabControl>
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="{DynamicResource RegionBrush}"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<ScrollViewer>
@@ -17,30 +18,30 @@
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<GroupBox Grid.Row="0" Grid.Column="0" Width="300" Height="200" Header="{x:Static langs:Lang.TitleDemoStr1}" Padding="10" Margin="16">
<GroupBox Grid.Row="0" Grid.Column="0" Width="300" Height="200" Header="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Padding="10" Margin="16">
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</GroupBox>
<GroupBox Grid.Row="0" Grid.Column="1" Width="300" Height="200" Header="{x:Static langs:Lang.TitleDemoStr1}" Padding="10" Margin="16" hc:TitleElement.TitleAlignment="Left">
<GroupBox Grid.Row="0" Grid.Column="1" Width="300" Height="200" Header="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Padding="10" Margin="16" hc:TitleElement.TitleAlignment="Left">
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</GroupBox>
<GroupBox Grid.Row="1" Grid.Column="0" Width="300" Height="200" Header="{x:Static langs:Lang.TitleDemoStr1}" Padding="10" Margin="16" Style="{StaticResource GroupBoxTab}">
<GroupBox Grid.Row="1" Grid.Column="0" Width="300" Height="200" Header="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Padding="10" Margin="16" Style="{StaticResource GroupBoxTab}">
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</GroupBox>
<GroupBox Grid.Row="1" Grid.Column="1" Width="300" Height="200" Header="{x:Static langs:Lang.TitleDemoStr1}" Padding="10" Margin="16" Style="{StaticResource GroupBoxTab}" hc:TitleElement.TitleAlignment="Left">
<GroupBox Grid.Row="1" Grid.Column="1" Width="300" Height="200" Header="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Padding="10" Margin="16" Style="{StaticResource GroupBoxTab}" hc:TitleElement.TitleAlignment="Left">
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</GroupBox>
<GroupBox Grid.Row="2" Grid.Column="0" Width="300" Header="{x:Static langs:Lang.TitleDemoStr1}" Margin="16" Style="{StaticResource GroupBoxOriginal}" HorizontalContentAlignment="Left">
<GroupBox Grid.Row="2" Grid.Column="0" Width="300" Header="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="16" Style="{StaticResource GroupBoxOriginal}" HorizontalContentAlignment="Left">
<TextBox/>
</GroupBox>
<GroupBox Grid.Row="2" VerticalAlignment="Bottom" Grid.Column="1" Width="300" hc:TitleElement.TitleWidth="100" Header="{x:Static langs:Lang.TitleDemoStr1}" Margin="16" Style="{StaticResource GroupBoxOriginal}" HorizontalContentAlignment="Left" hc:TitleElement.TitleAlignment="Left">
<GroupBox Grid.Row="2" VerticalAlignment="Bottom" Grid.Column="1" Width="300" hc:TitleElement.TitleWidth="100" Header="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="16" Style="{StaticResource GroupBoxOriginal}" HorizontalContentAlignment="Left" hc:TitleElement.TitleAlignment="Left">
<ComboBox DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}" ItemsSource="{Binding DataList}"/>
</GroupBox>
</Grid>
@@ -3,15 +3,16 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32">
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelDanger}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelInfo}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelPrimary}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelSuccess}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelWarning}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelDanger}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelInfo}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelPrimary}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelSuccess}"/>
<Label HorizontalAlignment="Left" Margin="5" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource LabelWarning}"/>
</StackPanel>
</hc:TransitioningContentControl>
</UserControl>
@@ -3,14 +3,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<ListView ItemsSource="{Binding DataList}">
<ListView.View>
<GridView>
<GridViewColumn Width="80" Header="{x:Static langs:Lang.Index}" DisplayMemberBinding="{Binding Index}"/>
<GridViewColumn Width="100" Header="{x:Static langs:Lang.Name}" DisplayMemberBinding="{Binding Name}"/>
<GridViewColumn Width="200" Header="{x:Static langs:Lang.Remark}" DisplayMemberBinding="{Binding Remark}"/>
<GridViewColumn Width="80" Header="{ex:Lang Key={x:Static langs:LangKeys.Index}}" DisplayMemberBinding="{Binding Index}"/>
<GridViewColumn Width="100" Header="{ex:Lang Key={x:Static langs:LangKeys.Name}}" DisplayMemberBinding="{Binding Name}"/>
<GridViewColumn Width="200" Header="{ex:Lang Key={x:Static langs:LangKeys.Remark}}" DisplayMemberBinding="{Binding Remark}"/>
</GridView>
</ListView.View>
</ListView>
@@ -3,10 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:SimplePanel Margin="32">
<TextBlock Text="{x:Static langs:Lang.RightClickHere}" Foreground="{DynamicResource BorderBrush}" Style="{StaticResource TextBlockTitle}"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.RightClickHere}}" Foreground="{DynamicResource BorderBrush}" Style="{StaticResource TextBlockTitle}"/>
<Rectangle Width="200" Height="112" RadiusX="4" RadiusY="4" Stroke="{DynamicResource BorderBrush}" StrokeDashArray="2,2"/>
<Border Width="200" Height="112" Background="Transparent">
<Border.ContextMenu>
@@ -3,6 +3,7 @@
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"
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
@@ -12,15 +13,15 @@
<ComboBox ItemsSource="{Binding DataList}" Margin="0,16,0,0" SelectedIndex="0" IsEnabled="False"/>
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" Margin="0,16,0,0" IsEditable="True"/>
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Style="{StaticResource ComboBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
<ComboBox ItemsSource="{Binding DataList}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource ComboBoxExtend}" hc:InfoElement.Necessary="True" hc:InfoElement.Symbol="*" Margin="0,16,0,0"/>
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" SelectedIndex="0" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource ComboBoxExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Style="{StaticResource ComboBoxExtend}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
<ComboBox ItemsSource="{Binding DataList}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource ComboBoxExtend}" hc:InfoElement.Necessary="True" hc:InfoElement.Symbol="*" Margin="0,16,0,0"/>
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" SelectedIndex="0" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource ComboBoxExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<ComboBox ItemsSource="{Binding DataList}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource ComboBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
<ComboBox ItemsSource="{Binding DataList}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" hc:InfoElement.Necessary="True" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0"/>
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" hc:InfoElement.Necessary="True" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0"/>
<ComboBox ItemsSource="{Binding DataList}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource ComboBoxExtend}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
<ComboBox ItemsSource="{Binding DataList}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0"/>
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0"/>
</StackPanel>
</ScrollViewer>
</hc:TransitioningContentControl>
@@ -4,17 +4,18 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32">
<DatePicker SelectedDate="{x:Static system:DateTime.Now}"/>
<DatePicker Margin="0,16,0,0" IsEnabled="False" SelectedDate="{x:Static system:DateTime.Now}"/>
<DatePicker SelectedDate="{x:Static system:DateTime.Now}" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
<DatePicker SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<DatePicker SelectedDate="{x:Static system:DateTime.Now}" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
<DatePicker SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<DatePicker SelectedDate="{x:Static system:DateTime.Now}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
<DatePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<DatePicker SelectedDate="{x:Static system:DateTime.Now}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
<DatePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
</StackPanel>
</hc:TransitioningContentControl>
@@ -3,17 +3,18 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32">
<PasswordBox Password="123456"/>
<PasswordBox Password="123456" IsEnabled="False" Margin="0,16,0,0"/>
<PasswordBox hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Password="123456" Margin="0,32,0,0" Style="{StaticResource PasswordBoxExtend}"/>
<PasswordBox hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource PasswordBoxExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<PasswordBox hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Password="123456" Margin="0,32,0,0" Style="{StaticResource PasswordBoxExtend}"/>
<PasswordBox hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource PasswordBoxExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<PasswordBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource PasswordBoxExtend}" Margin="0,32,0,0" Password="123456"/>
<PasswordBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" hc:InfoElement.Necessary="True" Style="{StaticResource PasswordBoxExtend}" Margin="0,16,0,0"/>
<PasswordBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource PasswordBoxExtend}" Margin="0,32,0,0" Password="123456"/>
<PasswordBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Style="{StaticResource PasswordBoxExtend}" Margin="0,16,0,0"/>
</StackPanel>
</hc:TransitioningContentControl>
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}"
Width="550"
Height="600">
@@ -17,27 +18,27 @@
<StackPanel Orientation="Horizontal">
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
</StackPanel>
@@ -48,27 +49,27 @@
<WrapPanel Orientation="Horizontal">
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</Border>
</WrapPanel>
@@ -3,173 +3,174 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<ScrollViewer>
<UniformGrid Rows="2" Columns="2" Margin="16">
<TabControl TabStripPlacement="Right" Margin="16" Width="400" Height="200">
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}2">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="5"/>
</TextBlock>
</Border>
</TabItem>
</TabControl>
<TabControl Margin="16" Width="400" Height="200" Style="{StaticResource TabControlInLine}">
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}2">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem IsSelected="True" Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
<TabItem IsSelected="True" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="5"/>
</TextBlock>
</Border>
</TabItem>
</TabControl>
<TabControl TabStripPlacement="Left" Margin="16" Width="400" Height="200" Style="{StaticResource TabControlCapsule}">
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem IsSelected="True" Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
<TabItem IsSelected="True" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}2">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="5"/>
</TextBlock>
</Border>
</TabItem>
</TabControl>
<TabControl TabStripPlacement="Bottom" Margin="16" Width="400" Height="200" Style="{StaticResource TabControlCapsuleSolid}">
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}2">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem IsSelected="True" Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
<TabItem IsSelected="True" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="{ex:Lang Key={x:Static langs:LangKeys.Text}}"/>
<Run Text="5"/>
</TextBlock>
</Border>
@@ -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"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32">
<TextBox Text="{x:Static langs:Lang.ContentDemoStr}"/>
<TextBox Text="{x:Static langs:Lang.ContentDemoStr}" Margin="0,16,0,0" IsEnabled="False"/>
<TextBox Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
<TextBox Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" Margin="0,16,0,0" IsEnabled="False"/>
<TextBox hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
<TextBox hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource TextBoxExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<TextBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
<TextBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" hc:InfoElement.Necessary="True" Style="{StaticResource TextBoxExtend}" Margin="0,16,0,0"/>
<TextBox hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
<TextBox hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource TextBoxExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<TextBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
<TextBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Style="{StaticResource TextBoxExtend}" Margin="0,16,0,0"/>
</StackPanel>
</hc:TransitioningContentControl>
</UserControl>
@@ -5,11 +5,12 @@
xmlns:data="clr-namespace:HandyControlDemo.Data"
DataContext="{Binding WindowDemo,Source={StaticResource Locator}}"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<UniformGrid Margin="32" Columns="3" Rows="3" Height="200">
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.NativeCommonWindow}" Content="{x:Static langs:Lang.OpenNativeCommonWindow}"/>
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.NavigationWindow}" Content="{x:Static langs:Lang.OpenNavigationWindow}"/>
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.NativeCommonWindow}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenNativeCommonWindow}}"/>
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.NavigationWindow}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenNavigationWindow}}"/>
</UniformGrid>
</hc:TransitioningContentControl>
</UserControl>
@@ -3,47 +3,48 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32" HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<StackPanel>
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Margin="0,16,0,0" Content="{x:Static langs:Lang.RadioButton}" IsChecked="True" IsEnabled="False"/>
<RadioButton Margin="0,16,0,0" Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Margin="0,16,0,0" Content="{x:Static langs:Lang.RadioButton}" IsEnabled="False"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Margin="0,16,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True" IsEnabled="False"/>
<RadioButton Margin="0,16,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Margin="0,16,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsEnabled="False"/>
</StackPanel>
<UniformGrid Margin="22,0,0,0" Rows="2" Columns="2">
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" Style="{StaticResource RadioButtonIcon}" Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
<RadioButton Margin="10,0,0,0" BorderThickness="1" hc:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Margin="10,0,0,0" BorderThickness="1" Style="{StaticResource RadioButtonIcon}" Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" Style="{StaticResource RadioButtonIcon}" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Margin="10,0,0,0" BorderThickness="1" hc:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Margin="10,0,0,0" BorderThickness="1" Style="{StaticResource RadioButtonIcon}" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
</UniformGrid>
</StackPanel>
<hc:ButtonGroup Margin="0,32,0,0">
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton IsEnabled="False" Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="0,16,0,0" Style="{StaticResource ButtonGroupSolid}">
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton IsEnabled="False" Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
</hc:ButtonGroup>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<hc:ButtonGroup Margin="0,16,8,0" Orientation="Vertical">
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton IsEnabled="False" Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="8,16,0,0" Orientation="Vertical" Style="{StaticResource ButtonGroupSolid}">
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton IsEnabled="False" Content="{x:Static langs:Lang.RadioButton}"/>
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
</hc:ButtonGroup>
</StackPanel>
</StackPanel>
@@ -3,38 +3,39 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:ScrollViewer IsInertiaEnabled="True">
<StackPanel Margin="32">
<WrapPanel ItemWidth="160" ItemHeight="130">
<StackPanel>
<RepeatButton Content="{x:Static langs:Lang.Default}" Margin="5"/>
<RepeatButton IsEnabled="False" Content="{x:Static langs:Lang.Default}" Margin="5"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Default}}" Margin="5"/>
<RepeatButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Default}}" Margin="5"/>
</StackPanel>
<StackPanel>
<RepeatButton Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource RepeatButtonPrimary}"/>
<RepeatButton IsEnabled="False" Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource RepeatButtonPrimary}"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Primary}}" Margin="5" Style="{StaticResource RepeatButtonPrimary}"/>
<RepeatButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Primary}}" Margin="5" Style="{StaticResource RepeatButtonPrimary}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonPrimary"/>
</StackPanel>
<StackPanel>
<RepeatButton Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource RepeatButtonSuccess}"/>
<RepeatButton IsEnabled="False" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource RepeatButtonSuccess}"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" Style="{StaticResource RepeatButtonSuccess}"/>
<RepeatButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" Style="{StaticResource RepeatButtonSuccess}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonSuccess"/>
</StackPanel>
<StackPanel>
<RepeatButton Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource RepeatButtonInfo}"/>
<RepeatButton IsEnabled="False" Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource RepeatButtonInfo}"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="5" Style="{StaticResource RepeatButtonInfo}"/>
<RepeatButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="5" Style="{StaticResource RepeatButtonInfo}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonInfo"/>
</StackPanel>
<StackPanel>
<RepeatButton Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource RepeatButtonWarning}"/>
<RepeatButton IsEnabled="False" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource RepeatButtonWarning}"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource RepeatButtonWarning}"/>
<RepeatButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource RepeatButtonWarning}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonWarning"/>
</StackPanel>
<StackPanel>
<RepeatButton Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource RepeatButtonDanger}"/>
<RepeatButton IsEnabled="False" Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource RepeatButtonDanger}"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Danger}}" Margin="5" Style="{StaticResource RepeatButtonDanger}"/>
<RepeatButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Danger}}" Margin="5" Style="{StaticResource RepeatButtonDanger}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonDanger"/>
</StackPanel>
</WrapPanel>
@@ -45,13 +46,13 @@
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="Default(DeleteGeometry)"/>
</StackPanel>
<StackPanel>
<RepeatButton Content="{x:Static langs:Lang.Clock}" Margin="5" Style="{StaticResource RepeatButtonPrimary}" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<RepeatButton Content="{x:Static langs:Lang.Clock}" IsEnabled="False" Margin="5" Style="{StaticResource RepeatButtonPrimary}" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" Margin="5" Style="{StaticResource RepeatButtonPrimary}" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" IsEnabled="False" Margin="5" Style="{StaticResource RepeatButtonPrimary}" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonPrimary(ClockGeometry)"/>
</StackPanel>
<StackPanel>
<RepeatButton Content="{x:Static langs:Lang.Calendar}" Margin="5" Style="{StaticResource RepeatButtonSuccess}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<RepeatButton Content="{x:Static langs:Lang.Calendar}" IsEnabled="False" Margin="5" Style="{StaticResource RepeatButtonSuccess}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" Margin="5" Style="{StaticResource RepeatButtonSuccess}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<RepeatButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" IsEnabled="False" Margin="5" Style="{StaticResource RepeatButtonSuccess}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonSuccess(CalendarGeometry)"/>
</StackPanel>
<StackPanel>
@@ -72,8 +73,8 @@
</WrapPanel>
<WrapPanel ItemWidth="160" ItemHeight="130">
<StackPanel>
<RepeatButton Margin="5" Height="28" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonCustom}" Style="{StaticResource RepeatButtonCustom}" hc:BackgroundSwitchElement.MouseHoverBackground="Red" hc:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<RepeatButton Margin="5" Height="28" IsEnabled="False" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonCustom}" Style="{StaticResource RepeatButtonCustom}" hc:BackgroundSwitchElement.MouseHoverBackground="Red" hc:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<RepeatButton Margin="5" Height="28" Padding="10,0" Background="#24292e" Foreground="White" Content="{ex:Lang Key={x:Static langs:LangKeys.ButtonCustom}}" Style="{StaticResource RepeatButtonCustom}" hc:BackgroundSwitchElement.MouseHoverBackground="Red" hc:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<RepeatButton Margin="5" Height="28" IsEnabled="False" Padding="10,0" Background="#24292e" Foreground="White" Content="{ex:Lang Key={x:Static langs:LangKeys.ButtonCustom}}" Style="{StaticResource RepeatButtonCustom}" hc:BackgroundSwitchElement.MouseHoverBackground="Red" hc:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonCustom"/>
</StackPanel>
<StackPanel>
@@ -3,15 +3,16 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<RichTextBox Margin="32" Width="400" Height="300" ScrollViewer.VerticalScrollBarVisibility="Auto">
<FlowDocument>
<Paragraph>
<Run FontSize="20" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=20,Mode=OneWay}"/>
<Run FontSize="20" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20,Mode=OneWay}"/>
</Paragraph>
<Paragraph>
<Run Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=1000,Mode=OneWay}"/>
<Run Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=1000,Mode=OneWay}"/>
</Paragraph>
<Paragraph>
<Hyperlink>https://github.com/NaBian/HandyControl</Hyperlink>
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32" Orientation="Horizontal">
@@ -26,23 +27,23 @@
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultSuccess" Style="{StaticResource TextBlockDefaultSuccess}"/>
</StackPanel>
<StackPanel Margin="10,0,0,0">
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockLargeBold}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockLarge}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=12}" Style="{StaticResource TextBlockTitleBold}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=12}" Style="{StaticResource TextBlockTitle}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.SubTitle},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockSubTitleBold}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.SubTitle},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockSubTitle}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockLargeBold}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockLarge}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=12}" Style="{StaticResource TextBlockTitleBold}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Title}},Converter={StaticResource StringRepeatConverter},ConverterParameter=12}" Style="{StaticResource TextBlockTitle}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.SubTitle}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockSubTitleBold}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.SubTitle}},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockSubTitle}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultBold}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefault}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultAccent}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultSecLight}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultThiLight}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultPrimary}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultDanger}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultWarning}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultInfo}"/>
<TextBlock hc:TextBlockAttach.AutoTooltip="True" Width="300" HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultSuccess}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultBold}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefault}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultAccent}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultSecLight}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultThiLight}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultPrimary}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultDanger}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultWarning}"/>
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultInfo}"/>
<TextBlock hc:TextBlockAttach.AutoTooltip="True" Width="300" HorizontalAlignment="Left" Margin="5" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultSuccess}"/>
</StackPanel>
</StackPanel>
</hc:TransitioningContentControl>
@@ -3,38 +3,39 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="{DynamicResource RegionBrush}"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<hc:ScrollViewer IsInertiaEnabled="True">
<StackPanel Margin="32">
<WrapPanel ItemWidth="160" ItemHeight="130">
<StackPanel>
<ToggleButton IsChecked="True" Content="{x:Static langs:Lang.Default}" Margin="5"/>
<ToggleButton IsEnabled="False" IsChecked="True" Content="{x:Static langs:Lang.Default}" Margin="5"/>
<ToggleButton IsChecked="True" Content="{ex:Lang Key={x:Static langs:LangKeys.Default}}" Margin="5"/>
<ToggleButton IsEnabled="False" IsChecked="True" Content="{ex:Lang Key={x:Static langs:LangKeys.Default}}" Margin="5"/>
</StackPanel>
<StackPanel>
<ToggleButton IsChecked="True" Content="{x:Static langs:Lang.Primary}" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonPrimary}"/>
<ToggleButton IsEnabled="False" IsChecked="True" Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ToggleButtonPrimary}"/>
<ToggleButton IsChecked="True" Content="{ex:Lang Key={x:Static langs:LangKeys.Primary}}" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonPrimary}"/>
<ToggleButton IsEnabled="False" IsChecked="True" Content="{ex:Lang Key={x:Static langs:LangKeys.Primary}}" Margin="5" Style="{StaticResource ToggleButtonPrimary}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonPrimary"/>
</StackPanel>
<StackPanel>
<ToggleButton IsChecked="True" Content="{x:Static langs:Lang.Success}" Margin="5" hc:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource ToggleButtonSuccess}"/>
<ToggleButton IsEnabled="False" IsChecked="True" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ToggleButtonSuccess}"/>
<ToggleButton IsChecked="True" Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" hc:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource ToggleButtonSuccess}"/>
<ToggleButton IsEnabled="False" IsChecked="True" Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" Style="{StaticResource ToggleButtonSuccess}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonSuccess"/>
</StackPanel>
<StackPanel>
<ToggleButton Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ToggleButtonInfo}"/>
<ToggleButton IsEnabled="False" Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ToggleButtonInfo}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="5" Style="{StaticResource ToggleButtonInfo}"/>
<ToggleButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="5" Style="{StaticResource ToggleButtonInfo}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonInfo"/>
</StackPanel>
<StackPanel>
<ToggleButton Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ToggleButtonWarning}"/>
<ToggleButton IsEnabled="False" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ToggleButtonWarning}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource ToggleButtonWarning}"/>
<ToggleButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource ToggleButtonWarning}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonWarning"/>
</StackPanel>
<StackPanel>
<ToggleButton Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ToggleButtonDanger}"/>
<ToggleButton IsEnabled="False" Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ToggleButtonDanger}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Danger}}" Margin="5" Style="{StaticResource ToggleButtonDanger}"/>
<ToggleButton IsEnabled="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Danger}}" Margin="5" Style="{StaticResource ToggleButtonDanger}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonDanger"/>
</StackPanel>
</WrapPanel>
@@ -108,21 +109,21 @@
<ToggleButton BorderThickness="0" IsChecked="True" Margin="5" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonFlip}">
<hc:StatusSwitchElement.CheckedElement>
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{x:Static langs:Lang.Off}" Foreground="{DynamicResource TextIconBrush}"/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{ex:Lang Key={x:Static langs:LangKeys.Off}}" Foreground="{DynamicResource TextIconBrush}"/>
</Border>
</hc:StatusSwitchElement.CheckedElement>
<Border Background="{DynamicResource DangerBrush}">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{x:Static langs:Lang.On}" Foreground="{DynamicResource TextIconBrush}"/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{ex:Lang Key={x:Static langs:LangKeys.On}}" Foreground="{DynamicResource TextIconBrush}"/>
</Border>
</ToggleButton>
<ToggleButton BorderThickness="0" IsEnabled="False" IsChecked="True" Margin="5" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonFlip}">
<hc:StatusSwitchElement.CheckedElement>
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{x:Static langs:Lang.Off}" Foreground="{DynamicResource TextIconBrush}"/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{ex:Lang Key={x:Static langs:LangKeys.Off}}" Foreground="{DynamicResource TextIconBrush}"/>
</Border>
</hc:StatusSwitchElement.CheckedElement>
<Border Background="{DynamicResource DangerBrush}">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{x:Static langs:Lang.On}" Foreground="{DynamicResource TextIconBrush}"/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{ex:Lang Key={x:Static langs:LangKeys.On}}" Foreground="{DynamicResource TextIconBrush}"/>
</Border>
</ToggleButton>
<TextBlock Style="{StaticResource TextBlockDefault}" Text="ToggleButtonFlip"/>
@@ -3,11 +3,12 @@
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"
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<ToolBarTray Margin="32" VerticalAlignment="Center">
<ToolBar Padding="6" Header="{x:Static langs:Lang.Title}">
<ToolBar Padding="6" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
<CheckBox IsChecked="True" Margin="10,0,0,0"/>
<Separator Margin="10,0,0,0"/>
<RadioButton Margin="10,0,0,0"/>
@@ -15,16 +16,16 @@
<RadioButton IsChecked="True" Margin="10,0,0,0"/>
<RadioButton Margin="10,0,0,0"/>
</StackPanel>
<Button Content="{x:Static langs:Lang.Button}" Margin="10,0,0,0"/>
<Button Content="{x:Static langs:Lang.Button}" Margin="10,0,0,0" Style="{StaticResource ButtonPrimary}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="10,0,0,0"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="10,0,0,0" Style="{StaticResource ButtonPrimary}"/>
</ToolBar>
<ToolBar Band="1" Padding="6">
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" Width="230"/>
<TextBox Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=4,Mode=OneWay}" Margin="10,0,0,0" Width="230"/>
<TextBox Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}},Converter={StaticResource StringRepeatConverter},ConverterParameter=4,Mode=OneWay}" Margin="10,0,0,0" Width="230"/>
</ToolBar>
<ToolBar Band="0" Padding="6">
<Menu Background="Transparent" VerticalAlignment="Center">
<MenuItem Header="{x:Static langs:Lang.Repository}">
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Repository}}">
<MenuItem Header="GitHub">
<MenuItem.Icon>
<Path Data="{StaticResource GithubGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
@@ -36,24 +37,24 @@
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="{x:Static langs:Lang.About}">
<MenuItem Header="{x:Static langs:Lang.Email}">
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.About}}">
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Email}}">
<MenuItem.Icon>
<Path Data="{StaticResource EmailGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="{x:Static langs:Lang.Chatroom}">
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Chatroom}}">
<MenuItem.Icon>
<Path Data="{StaticResource GitterGeometry}" Fill="#e52e64"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="{x:Static langs:Lang.Blog}">
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Blog}}">
<MenuItem.Icon>
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="{x:Static langs:Lang.Contributors}"/>
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Contributors}}"/>
</Menu>
</ToolBar>
</ToolBarTray>