Merge branch 'master' into pr/623

This commit is contained in:
NaBian committed 2021-01-19 23:44:17 +08:00
commit 43569dde83
65 files changed
+2122 -1560

No files matched your search

@@ -729,6 +729,17 @@ namespace HandyControlDemo.Properties.Langs
}
}
/// <summary>
/// Looks up a localized string similar to 空状态.
/// </summary>
public static string Empty
{
get
{
return ResourceManager.GetString("Empty", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 错误.
/// </summary>
@@ -792,4 +792,7 @@
<data name="Feedback" xml:space="preserve">
<value>Feedback</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Empty</value>
</data>
</root>
@@ -792,4 +792,7 @@
<data name="Feedback" xml:space="preserve">
<value>Feedback</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Empty</value>
</data>
</root>
@@ -792,4 +792,7 @@
<data name="Feedback" xml:space="preserve">
<value>Feedback</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Empty</value>
</data>
</root>
@@ -792,4 +792,7 @@
<data name="Feedback" xml:space="preserve">
<value>Feedback</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Empty</value>
</data>
</root>
@@ -792,4 +792,7 @@
<data name="Feedback" xml:space="preserve">
<value>Feedback</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Empty</value>
</data>
</root>
@@ -792,4 +792,7 @@
<data name="Feedback" xml:space="preserve">
<value>Feedback</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Empty</value>
</data>
</root>
@@ -792,4 +792,7 @@
<data name="Feedback" xml:space="preserve">
<value>反馈</value>
</data>
<data name="Empty" xml:space="preserve">
<value>空状态</value>
</data>
</root>
@@ -792,4 +792,7 @@
<data name="Feedback" xml:space="preserve">
<value>Feedback</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Empty</value>
</data>
</root>
@@ -792,4 +792,7 @@
<data name="Feedback" xml:space="preserve">
<value>Feedback</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Empty</value>
</data>
</root>
@@ -97,6 +97,7 @@ namespace HandyControlDemo.Properties.Langs
OnPropertyChanged(nameof(Drawer));
OnPropertyChanged(nameof(Effects));
OnPropertyChanged(nameof(Email));
OnPropertyChanged(nameof(Empty));
OnPropertyChanged(nameof(Error));
OnPropertyChanged(nameof(Exit));
OnPropertyChanged(nameof(Expander));
@@ -564,6 +565,11 @@ namespace HandyControlDemo.Properties.Langs
/// </summary>
public string Email => Lang.Email;
/// <summary>
/// 查找类似 空状态 的本地化字符串。
/// </summary>
public string Empty => Lang.Empty;
/// <summary>
/// 查找类似 错误 的本地化字符串。
/// </summary>
@@ -1698,6 +1704,11 @@ namespace HandyControlDemo.Properties.Langs
/// </summary>
public static string Email = nameof(Email);
/// <summary>
/// 查找类似 空状态 的本地化字符串。
/// </summary>
public static string Empty = nameof(Empty);
/// <summary>
/// 查找类似 错误 的本地化字符串。
/// </summary>
@@ -5,22 +5,6 @@
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:SimplePanel Margin="22">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ToggleButton Margin="10" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="0" Content="Left" IsChecked="{Binding IsOpen,ElementName=DrawerLeft}"/>
<ToggleButton Margin="10" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="1" Content="Top" IsChecked="{Binding IsOpen,ElementName=DrawerTop}"/>
<ToggleButton Margin="10" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="2" Content="Right" IsChecked="{Binding IsOpen,ElementName=DrawerRight}"/>
<ToggleButton Margin="10" HorizontalAlignment="Stretch" Grid.Row="2" Grid.Column="1" Content="Bottom" IsChecked="{Binding IsOpen,ElementName=DrawerBottom}"/>
</Grid>
<hc:Drawer Name="DrawerLeft" Dock="Left" ShowMode="Push">
<Border Background="{DynamicResource RegionBrush}" Width="300" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource BorderBrush}">
<Grid>
@@ -69,6 +53,22 @@
</Grid>
</Border>
</hc:Drawer>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ToggleButton Margin="10" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="0" Content="Left" IsChecked="{Binding IsOpen,ElementName=DrawerLeft}"/>
<ToggleButton Margin="10" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="1" Content="Top" IsChecked="{Binding IsOpen,ElementName=DrawerTop}"/>
<ToggleButton Margin="10" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="2" Content="Right" IsChecked="{Binding IsOpen,ElementName=DrawerRight}"/>
<ToggleButton Margin="10" HorizontalAlignment="Stretch" Grid.Row="2" Grid.Column="1" Content="Bottom" IsChecked="{Binding IsOpen,ElementName=DrawerBottom}"/>
</Grid>
</hc:SimplePanel>
</hc:TransitioningContentControl>
</UserControl>
</UserControl>
@@ -6,19 +6,63 @@
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="{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="{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="{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="{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>
<WrapPanel Margin="16" HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel Width="240" Margin="16">
<Expander Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
<Border Height="100" BorderThickness="1,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="0,0,4,4"/>
</Expander>
<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 RegionBrush}" CornerRadius="0,0,4,4"/>
</Expander>
<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 RegionBrush}" CornerRadius="0,0,4,4"/>
</Expander>
<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 RegionBrush}" CornerRadius="0,0,4,4"/>
</Expander>
</StackPanel>
<StackPanel Width="240" Margin="16">
<Expander Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Up">
<Border Height="100" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="4,4,0,0"/>
</Expander>
<Expander Margin="0,4,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Up">
<Border Height="100" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="4,4,0,0"/>
</Expander>
<Expander Margin="0,4,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Up">
<Border Height="100" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="4,4,0,0"/>
</Expander>
<Expander Margin="0,4,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Up">
<Border Height="100" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="4,4,0,0"/>
</Expander>
</StackPanel>
<StackPanel Height="240" Margin="16" Orientation="Horizontal">
<Expander Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Left">
<Border Width="100" BorderThickness="1,1,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="4,0,0,4"/>
</Expander>
<Expander Margin="4,0,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Left">
<Border Width="100" BorderThickness="1,1,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="4,0,0,4"/>
</Expander>
<Expander Margin="4,0,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Left">
<Border Width="100" BorderThickness="1,1,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="4,0,0,4"/>
</Expander>
<Expander Margin="4,0,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Left">
<Border Width="100" BorderThickness="1,1,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="4,0,0,4"/>
</Expander>
</StackPanel>
<StackPanel Height="240" Margin="16" Orientation="Horizontal">
<Expander Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Right">
<Border Width="100" BorderThickness="0,1,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="0,4,4,0"/>
</Expander>
<Expander Margin="4,0,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Right">
<Border Width="100" BorderThickness="0,1,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="0,4,4,0"/>
</Expander>
<Expander Margin="4,0,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Right">
<Border Width="100" BorderThickness="0,1,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="0,4,4,0"/>
</Expander>
<Expander Margin="4,0,0,0" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" ExpandDirection="Right">
<Border Width="100" BorderThickness="0,1,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="0,4,4,0"/>
</Expander>
</StackPanel>
</WrapPanel>
</hc:TransitioningContentControl>
</UserControl>
@@ -19,23 +19,23 @@
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<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="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</GroupBox>
<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.TitlePlacement="Left">
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</GroupBox>
<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="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</GroupBox>
<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.TitlePlacement="Left">
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</GroupBox>
<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">
@@ -14,7 +14,7 @@
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,0,10" Value="100" Maximum="200" IsIndeterminate="True"/>
</StackPanel>
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressbarPrimary" HorizontalAlignment="Left"/>
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPrimary" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarSuccess" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarInfo" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarWarning" HorizontalAlignment="Left"/>
@@ -36,7 +36,7 @@
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarInfoStripe" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarWarningStripe" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarDangerStripe" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPlayer" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarFlat" HorizontalAlignment="Left"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Height="200">
@@ -5,14 +5,13 @@
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="{ex:Lang Key={x:Static langs:LangKeys.DialogDemo}}"
Width="800"
Height="500">
<hc:TransitioningContentControl>
<StackPanel Margin="32" VerticalAlignment="Center">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.ShowInCurrentWindow}}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{x:Static data:MessageToken.DialogDemoWindow}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.ShowInCurrentWindow}}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{Binding DialogToken,RelativeSource={RelativeSource AncestorType=Window}}"/>
<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>
@@ -1,10 +1,28 @@
namespace HandyControlDemo.Window
using System;
using System.Windows;
using HandyControl.Controls;
using HandyControlDemo.Data;
namespace HandyControlDemo.Window
{
public partial class DialogDemoWindow
{
public DialogDemoWindow()
{
InitializeComponent();
var dialogToken = $"{MessageToken.DialogDemoWindow}+{DateTime.Now:yyyyMMddHHmmssfff}";
DialogToken = dialogToken;
Dialog.SetToken(this, dialogToken);
}
public static readonly DependencyProperty DialogTokenProperty = DependencyProperty.Register(
"DialogToken", typeof(string), typeof(DialogDemoWindow), new PropertyMetadata(default(string)));
public string DialogToken
{
get => (string) GetValue(DialogTokenProperty);
set => SetValue(DialogTokenProperty, value);
}
}
}