support for dynamic switching languages
This commit is contained in:
1 parent
7a39b18f0b
commit
95f35c7366
89 files changed
+3697
-549
No files matched your search
@@ -46,6 +46,12 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>MessageToken.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\LangDecorator.cs">
|
||||
<Link>Properties\Langs\LangDecorator.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>LangDecorator.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.Designer.cs">
|
||||
<Link>Properties\Langs\Lang.Designer.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -517,6 +523,11 @@
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||
</Content>
|
||||
<Content Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\LangDecorator.tt">
|
||||
<Link>Properties\Langs\LangDecorator.tt</Link>
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>LangDecorator.cs</LastGenOutput>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\Shared\HandyControlDemo_Shared\Data\MessageToken.tt" Link="Data\MessageToken.tt">
|
||||
|
||||
@@ -42,6 +42,12 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Lang.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\Langs\LangDecorator.cs">
|
||||
<Link>Properties\Langs\LangDecorator.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>LangDecorator.tt</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.en.resx">
|
||||
@@ -65,6 +71,13 @@
|
||||
<Link>Properties\CoreAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\Shared\HandyControl_Shared\Properties\Langs\LangDecorator.tt">
|
||||
<Link>Properties\Langs\LangDecorator.tt</Link>
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>LangDecorator.cs</LastGenOutput>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
|
||||
<ItemGroup>
|
||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\dropper.cur">
|
||||
|
||||
@@ -75,6 +75,12 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>MessageToken.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\LangDecorator.cs">
|
||||
<Link>Properties\Langs\LangDecorator.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>LangDecorator.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\AssemblyInfo.cs">
|
||||
<Link>Properties\AssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
@@ -446,6 +452,11 @@
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||
</Content>
|
||||
<Content Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\LangDecorator.tt">
|
||||
<Link>Properties\Langs\LangDecorator.tt</Link>
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>LangDecorator.cs</LastGenOutput>
|
||||
</Content>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Effects_16x.png">
|
||||
<Link>Resources\Img\LeftMainContent\Effects_16x.png</Link>
|
||||
</Resource>
|
||||
|
||||
@@ -47,6 +47,12 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Lang.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\Langs\LangDecorator.cs">
|
||||
<Link>Properties\Langs\LangDecorator.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>LangDecorator.tt</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="PresentationCore" />
|
||||
@@ -107,6 +113,11 @@
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Lang.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<Content Include="..\..\Shared\HandyControl_Shared\Properties\Langs\LangDecorator.tt">
|
||||
<Link>Properties\Langs\LangDecorator.tt</Link>
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>LangDecorator.cs</LastGenOutput>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\dropper.cur">
|
||||
|
||||
@@ -155,6 +155,12 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>MessageToken.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\LangDecorator.cs">
|
||||
<Link>Properties\Langs\LangDecorator.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>LangDecorator.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\AssemblyInfo.cs">
|
||||
<Link>Properties\AssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
@@ -507,6 +513,11 @@
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\LangDecorator.tt">
|
||||
<Link>Properties\Langs\LangDecorator.tt</Link>
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>LangDecorator.cs</LastGenOutput>
|
||||
</Content>
|
||||
<Content Include="..\..\Shared\HandyControlDemo_Shared\Data\MessageToken.tt">
|
||||
<Link>Data\MessageToken.tt</Link>
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
|
||||
@@ -122,6 +122,12 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Lang.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\Langs\LangDecorator.cs">
|
||||
<Link>Properties\Langs\LangDecorator.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>LangDecorator.tt</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="PresentationCore" />
|
||||
@@ -152,6 +158,11 @@
|
||||
<LastGenOutput>Lang.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Content Include="..\..\Shared\HandyControl_Shared\Properties\Langs\LangDecorator.tt">
|
||||
<Link>Properties\Langs\LangDecorator.tt</Link>
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>LangDecorator.cs</LastGenOutput>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\dropper.cur">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
d1P1:Ignorable="d"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
@@ -25,11 +26,11 @@
|
||||
<ResourceDictionary Source="Resources/Themes/Theme.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary>
|
||||
<viewModel:ViewModelLocator x:Key="Locator" d:IsDataSource="True"/>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<langs:LangDecorator x:Key="DemoLangs"/>
|
||||
<viewModel:ViewModelLocator x:Key="Locator" d:IsDataSource="True"/>
|
||||
|
||||
<ObjectDataProvider x:Key="DemoTypes" MethodName="GetValues" ObjectType="sys:Enum">
|
||||
<ObjectDataProvider.MethodParameters>
|
||||
<x:Type Type="data:DemoType"/>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\HatchBrushConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\String2BrushConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\StringRepeatConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\LangExtension.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\AssemblyHelper.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\CommonHelper.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\Win32Helper.cs" />
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,73 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ assembly name="System.Core" #>
|
||||
<#@ import namespace="System.Linq" #>
|
||||
<#@ import namespace="System.Collections.Generic"#>
|
||||
<#@ assembly name="$(TargetPath)" #>
|
||||
<#@ import namespace="HandyControlDemo.Properties.Langs" #>
|
||||
<#@ output extension=".cs" #>
|
||||
<#
|
||||
var resourceType = typeof(Lang);
|
||||
var propertyNameList = resourceType.GetProperties().Where(item => item.PropertyType == typeof(string)).Select(item => item.Name);
|
||||
var langDic = new Dictionary<string, string>();
|
||||
foreach(var item in propertyNameList)
|
||||
{
|
||||
langDic[item] =
|
||||
@$"/// <summary>
|
||||
/// 查找类似 {Lang.ResourceManager.GetString(item, Lang.Culture)} 的本地化字符串。
|
||||
/// </summary>";
|
||||
}
|
||||
#>
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using HandyControl.Tools;
|
||||
|
||||
namespace HandyControlDemo.Properties.Langs
|
||||
{
|
||||
public class LangDecorator : INotifyPropertyChanged
|
||||
{
|
||||
internal static LangDecorator Instance => ResourceHelper.GetResource<LangDecorator>("DemoLangs");
|
||||
|
||||
private static string CultureInfoStr;
|
||||
|
||||
public static CultureInfo Culture
|
||||
{
|
||||
get => Lang.Culture;
|
||||
set
|
||||
{
|
||||
if (value == null) return;
|
||||
if (Equals(CultureInfoStr, value.EnglishName)) return;
|
||||
Lang.Culture = value;
|
||||
CultureInfoStr = value.EnglishName;
|
||||
|
||||
Instance.UpdateLangs();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateLangs()
|
||||
{
|
||||
<#foreach(var item in propertyNameList){#>
|
||||
OnPropertyChanged(nameof(<#=item#>));
|
||||
<#}#>
|
||||
}
|
||||
|
||||
<#foreach(var item in propertyNameList){#>
|
||||
<#=langDic[item]#>
|
||||
public string <#=item#> => Lang.<#=item#>;
|
||||
|
||||
<#}#>
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged(string propertyName) =>
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
public class LangKeys
|
||||
{
|
||||
<#foreach(var item in propertyNameList){#>
|
||||
<#=langDic[item]#>
|
||||
public static string <#=item#> = nameof(<#=item#>);
|
||||
|
||||
<#}#>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using HandyControlDemo.Properties.Langs;
|
||||
|
||||
namespace HandyControlDemo.Tools.Extension
|
||||
{
|
||||
public class LangExtension : HandyControl.Tools.Extension.LangExtension
|
||||
{
|
||||
public override object LangSource => LangDecorator.Instance;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
Height="486"
|
||||
Effect="{StaticResource EffectShadow5}"
|
||||
@@ -44,7 +45,7 @@
|
||||
</hc:EventTrigger>
|
||||
</hc:Interaction.Triggers>
|
||||
</TextBox>
|
||||
<Button Grid.Column="1" Visibility="{Binding IsChecked,ElementName=ToggleButtonAudio,Converter={StaticResource Boolean2VisibilityConverter}}" Content="{x:Static langs:Lang.PushToTalk}" HorizontalAlignment="Stretch">
|
||||
<Button Grid.Column="1" Visibility="{Binding IsChecked,ElementName=ToggleButtonAudio,Converter={StaticResource Boolean2VisibilityConverter}}" Content="{ex:Lang Key={x:Static langs:LangKeys.PushToTalk}}" HorizontalAlignment="Stretch">
|
||||
<hc:Interaction.Triggers>
|
||||
<hc:EventTrigger EventName="PreviewMouseLeftButtonDown">
|
||||
<hc:EventToCommand Command="{Binding StartRecordCmd}"/>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
CornerRadius="10"
|
||||
Width="400"
|
||||
@@ -10,7 +11,7 @@
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<StackPanel VerticalAlignment="Center" Margin="32">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Text="{Binding Message}"/>
|
||||
<TextBox Margin="0,32,0,0" Style="{StaticResource TextBoxExtend}" Text="{Binding Result,UpdateSourceTrigger=PropertyChanged}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PleaseInput}"/>
|
||||
<Button Width="120" Margin="0,32,0,0" Command="{Binding CloseCmd}" Style="{StaticResource ButtonPrimary}" Content="{x:Static langs:Lang.Ok}"/>
|
||||
<TextBox Margin="0,32,0,0" Style="{StaticResource TextBoxExtend}" Text="{Binding Result,UpdateSourceTrigger=PropertyChanged}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PleaseInput}}"/>
|
||||
<Button Width="120" Margin="0,32,0,0" Command="{Binding CloseCmd}" Style="{StaticResource ButtonPrimary}" Content="{ex:Lang Key={x:Static langs:LangKeys.Ok}}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
@@ -2,13 +2,14 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
CornerRadius="10"
|
||||
Width="400"
|
||||
Height="247"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:SimplePanel>
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Text="{x:Static langs:Lang.PleaseWait}"/>
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Text="{ex:Lang Key={x:Static langs:LangKeys.PleaseWait}}"/>
|
||||
<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
|
||||
</hc:SimplePanel>
|
||||
</Border>
|
||||
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
CornerRadius="10"
|
||||
Width="400"
|
||||
@@ -10,7 +11,7 @@
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:SimplePanel>
|
||||
<Viewbox Width="80" Height="80">
|
||||
<TextBlock TextWrapping="Wrap" Style="{StaticResource TextBlockLargeBold}" Text="{x:Static langs:Lang.PleaseWait}"/>
|
||||
<TextBlock TextWrapping="Wrap" Style="{StaticResource TextBlockLargeBold}" Text="{ex:Lang Key={x:Static langs:LangKeys.PleaseWait}}"/>
|
||||
</Viewbox>
|
||||
<Button Name="ButtonClose" Width="22" Height="22" Command="{Binding CloseCmd}" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
|
||||
<hc:CircleProgressBar Name="ProgressBarTimer" ShowText="False" Width="120" Height="120"/>
|
||||
|
||||
@@ -3,27 +3,28 @@
|
||||
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}"
|
||||
DataContext="{Binding BadgeDemo, Source={StaticResource Locator}}">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<hc:Badge Text="New" BadgeMargin="0,-14,-20,0" Height="30">
|
||||
<Button Content="{x:Static langs:Lang.Comment}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Comment}}"/>
|
||||
</hc:Badge>
|
||||
<hc:Badge Text="New" BadgeMargin="0,-14,-20,0" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="{x:Static langs:Lang.Comment}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Comment}}"/>
|
||||
</hc:Badge>
|
||||
<hc:Badge Value="{Binding Count}" BadgeMargin="0,-14,-10,0" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgePrimary}">
|
||||
<Button Content="{x:Static langs:Lang.Click2Count}" Command="{Binding CountCmd}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Click2Count}}" Command="{Binding CountCmd}"/>
|
||||
</hc:Badge>
|
||||
<hc:Badge Value="100" BadgeMargin="0,-14,-20,0" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="{x:Static langs:Lang.Comment}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Comment}}"/>
|
||||
</hc:Badge>
|
||||
<hc:Badge Status="Dot" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="{x:Static langs:Lang.Reply}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Reply}}"/>
|
||||
</hc:Badge>
|
||||
<hc:Badge Status="Processing" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="{x:Static langs:Lang.Reply}" />
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Reply}}" />
|
||||
</hc:Badge>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -3,67 +3,68 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs">
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
|
||||
<hc:TransitioningContentControl>
|
||||
<WrapPanel Margin="16" VerticalAlignment="Center">
|
||||
<StackPanel Margin="16">
|
||||
<hc:ButtonGroup>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton 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 Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
|
||||
<RadioButton 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,32,0,0">
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
</hc:ButtonGroup>
|
||||
<hc:ButtonGroup Margin="0,32,0,0" Style="{StaticResource ButtonGroupSolid}">
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}" IsChecked="True"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
</hc:ButtonGroup>
|
||||
<hc:ButtonGroup Margin="0,32,0,0">
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}" IsChecked="True"/>
|
||||
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
|
||||
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
|
||||
</hc:ButtonGroup>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="16" Orientation="Horizontal">
|
||||
<hc:ButtonGroup Orientation="Vertical">
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton 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 Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
|
||||
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
|
||||
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
|
||||
</hc:ButtonGroup>
|
||||
<hc:ButtonGroup Margin="32,0,0,0" Orientation="Vertical">
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
</hc:ButtonGroup>
|
||||
<hc:ButtonGroup Margin="32,0,0,0" Style="{StaticResource ButtonGroupSolid}" Orientation="Vertical">
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}" IsChecked="True"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
</hc:ButtonGroup>
|
||||
<hc:ButtonGroup Margin="32,0,0,0" Orientation="Vertical">
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<ToggleButton Content="{x:Static langs:Lang.ToggleButton}" IsChecked="True"/>
|
||||
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
|
||||
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
|
||||
</hc:ButtonGroup>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
|
||||
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>
|
||||
@@ -12,15 +13,15 @@
|
||||
<hc:ComboBox ItemsSource="{Binding DataList}" Margin="0,16,0,0" SelectedIndex="0" IsEnabled="False"/>
|
||||
<hc:ComboBox ShowClearButton="True" ItemsSource="{Binding DataList}" SelectedIndex="0" Margin="0,16,0,0" IsEditable="True"/>
|
||||
|
||||
<hc:ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<hc:ComboBox ShowClearButton="True" ItemsSource="{Binding DataList}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<hc:ComboBox ItemsSource="{Binding DataList}" IsEditable="True" SelectedIndex="0" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<hc:ComboBox AutoComplete="True" ShowClearButton="True" ItemsSource="{Binding DataList}" IsEditable="True" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<hc:ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
|
||||
<hc:ComboBox ShowClearButton="True" 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}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<hc:ComboBox ItemsSource="{Binding DataList}" IsEditable="True" SelectedIndex="0" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
|
||||
<hc:ComboBox AutoComplete="True" ShowClearButton="True" 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}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
|
||||
<hc:ComboBox ItemsSource="{Binding DataList}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<hc:ComboBox ShowClearButton="True" 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" Margin="0,32,0,0"/>
|
||||
<hc:ComboBox ItemsSource="{Binding DataList}" IsEditable="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<hc:ComboBox AutoComplete="True" ShowClearButton="True" 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" Margin="0,32,0,0"/>
|
||||
<hc: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}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
|
||||
<hc:ComboBox ShowClearButton="True" 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" Margin="0,32,0,0"/>
|
||||
<hc: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}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
|
||||
<hc:ComboBox AutoComplete="True" ShowClearButton="True" 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" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</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"
|
||||
DataContext="{Binding CoverView,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
@@ -15,7 +16,7 @@
|
||||
<hc:CoverView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Margin="10" Height="300" Background="{Binding BackgroundToken,Converter={StaticResource String2BrushConverter}}">
|
||||
<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>
|
||||
</DataTemplate>
|
||||
</hc:CoverView.ItemTemplate>
|
||||
|
||||
@@ -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">
|
||||
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}"/>
|
||||
<hc:DatePicker Margin="0,16,0,0" IsEnabled="False" SelectedDate="{x:Static system:DateTime.Now}"/>
|
||||
|
||||
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<hc:DatePicker SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
|
||||
<hc: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}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<hc: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}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
|
||||
<hc: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}}" hc:InfoElement.Necessary="True" 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}">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
@@ -10,21 +11,21 @@
|
||||
<hc:DateTimePicker ShowClearButton="True"/>
|
||||
<hc:DateTimePicker Margin="0,16,0,0" IsEnabled="False"/>
|
||||
|
||||
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<hc:DateTimePicker hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
|
||||
<hc:DateTimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<hc:DateTimePicker 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 DateTimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
|
||||
<hc:DateTimePicker 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 DateTimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="32,0,0,0">
|
||||
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus}"/>
|
||||
<hc:DateTimePicker Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource DateTimePickerPlus}"/>
|
||||
|
||||
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<hc:DateTimePicker hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
|
||||
<hc:DateTimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<hc:DateTimePicker 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 DateTimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
|
||||
<hc:DateTimePicker 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 DateTimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
hc:Dialog.Token="{x:Static data:MessageToken.DialogContainer}"
|
||||
@@ -12,12 +13,12 @@
|
||||
<hc:TransitioningContentControl>
|
||||
<hc:SimplePanel>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<Button Content="{x:Static langs:Lang.TextDialog}" Command="{Binding ShowTextCmd}" />
|
||||
<Button Margin="0,32,0,0" Content="{x:Static langs:Lang.TextDialogInControl}" Command="{Binding ShowTextCmd}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType=UserControl}}"/>
|
||||
<Button Margin="0,32,0,0" Content="{x:Static langs:Lang.TextDialogWithTimer}" Command="{Binding ShowInteractiveDialogCmd}" CommandParameter="True"/>
|
||||
<TextBox Margin="0,32,0,0" Text="{Binding DialogResult,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource TextBoxExtend}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PleaseInput}"/>
|
||||
<Button Margin="0,10,0,0" Content="{x:Static langs:Lang.InteractiveDialog}" Command="{Binding ShowInteractiveDialogCmd}"/>
|
||||
<Button Margin="0,32,0,0" Content="{x:Static langs:Lang.NewWindow}" Command="{Binding NewWindowCmd}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.TextDialog}}" Command="{Binding ShowTextCmd}" />
|
||||
<Button Margin="0,32,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.TextDialogInControl}}" Command="{Binding ShowTextCmd}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType=UserControl}}"/>
|
||||
<Button Margin="0,32,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.TextDialogWithTimer}}" Command="{Binding ShowInteractiveDialogCmd}" CommandParameter="True"/>
|
||||
<TextBox Margin="0,32,0,0" Text="{Binding DialogResult,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource TextBoxExtend}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PleaseInput}}"/>
|
||||
<Button Margin="0,10,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.InteractiveDialog}}" Command="{Binding ShowInteractiveDialogCmd}"/>
|
||||
<Button Margin="0,32,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.NewWindow}}" Command="{Binding NewWindowCmd}"/>
|
||||
</StackPanel>
|
||||
</hc:SimplePanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -3,39 +3,40 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs">
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
|
||||
<hc:TransitioningContentControl>
|
||||
<WrapPanel Margin="16">
|
||||
<StackPanel Margin="16" Width="300">
|
||||
<hc:Divider/>
|
||||
<hc:Divider Content="{x:Static langs:Lang.Title}"/>
|
||||
<hc:Divider Content="{x:Static langs:Lang.Title}" Padding="10,0"/>
|
||||
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}"/>
|
||||
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Padding="10,0"/>
|
||||
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}"/>
|
||||
<hc:Divider LineStrokeDashArray="2,2"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="16" Width="300">
|
||||
<hc:Divider Content="{x:Static langs:Lang.Title}" HorizontalContentAlignment="Left"/>
|
||||
<hc:Divider Content="{x:Static langs:Lang.Title}" Padding="10,0" HorizontalContentAlignment="Right"/>
|
||||
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HorizontalContentAlignment="Left"/>
|
||||
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Padding="10,0" HorizontalContentAlignment="Right"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<hc:Divider Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<hc:Divider Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:extension="clr-namespace:HandyControl.Tools.Extension;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="32">
|
||||
<TextBlock Text="{x:Static langs:Lang.BasicLayout}" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.BasicLayout}}" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<hc:Row Margin="0,20,0,0">
|
||||
<hc:Col Span="24">
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4"/>
|
||||
@@ -66,7 +67,7 @@
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
<TextBlock Text="{x:Static langs:Lang.ColumnSpacing}" Margin="0,32,0,0" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ColumnSpacing}}" Margin="0,32,0,0" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<hc:Row Margin="0,20,0,0" Gutter="20">
|
||||
<hc:Col Span="6">
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4"/>
|
||||
@@ -81,7 +82,7 @@
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
<TextBlock Text="{x:Static langs:Lang.HybridLayout}" Margin="0,32,0,0" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.HybridLayout}}" Margin="0,32,0,0" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<hc:Row Margin="0,20,0,0" Gutter="20">
|
||||
<hc:Col Span="16">
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4"/>
|
||||
@@ -115,7 +116,7 @@
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
<TextBlock Text="{x:Static langs:Lang.ColumnOffset}" Margin="0,32,0,0" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ColumnOffset}}" Margin="0,32,0,0" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<hc:Row Margin="0,20,0,0" Gutter="20">
|
||||
<hc:Col Span="6">
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4"/>
|
||||
@@ -137,7 +138,7 @@
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
<TextBlock Text="{x:Static langs:Lang.ResponsiveLayout}" Margin="0,32,0,0" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ResponsiveLayout}}" Margin="0,32,0,0" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<hc:Row Margin="0,20,0,0" Gutter="10">
|
||||
<hc:Col Layout="8,6,4,3,1">
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4"/>
|
||||
|
||||
@@ -3,31 +3,32 @@
|
||||
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 GrowlDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<GroupBox Header="Window" Padding="10,5">
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<Button Command="{Binding InfoCmd}" Content="{x:Static langs:Lang.Info}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{x:Static langs:Lang.Error}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{x:Static langs:Lang.Ask}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button Command="{Binding InfoCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Error}}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Ask}}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Fatal}}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Clear}}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
</GroupBox>
|
||||
<Button Command="{Binding NewWindowCmd}" Content="{x:Static langs:Lang.NewWindow}" Margin="0,32" HorizontalAlignment="Left"/>
|
||||
<Button Command="{Binding NewWindowCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.NewWindow}}" Margin="0,32" HorizontalAlignment="Left"/>
|
||||
<GroupBox Header="Desktop" Padding="10,5">
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<Button Command="{Binding InfoGlobalCmd}" Content="{x:Static langs:Lang.Info}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessGlobalCmd}" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningGlobalCmd}" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorGlobalCmd}" Content="{x:Static langs:Lang.Error}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskGlobalCmd}" Content="{x:Static langs:Lang.Ask}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalGlobalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearGlobalCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button Command="{Binding InfoGlobalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessGlobalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningGlobalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorGlobalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Error}}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskGlobalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Ask}}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalGlobalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Fatal}}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearGlobalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Clear}}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
</GroupBox>
|
||||
</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"
|
||||
DataContext="{Binding CardDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
@@ -12,8 +13,8 @@
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<hc:ButtonGroup Margin="0,0,0,16">
|
||||
<Button Command="{Binding AddItemCmd}" Content="{x:Static langs:Lang.AddItem}"/>
|
||||
<Button Command="{Binding RemoveItemCmd}" Content="{x:Static langs:Lang.RemoveItem}"/>
|
||||
<Button Command="{Binding AddItemCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.AddItem}}"/>
|
||||
<Button Command="{Binding RemoveItemCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.RemoveItem}}"/>
|
||||
</hc:ButtonGroup>
|
||||
<Border Padding="0" Grid.Row="1" Style="{StaticResource BorderRegion}">
|
||||
<ListBox Background="Transparent" BorderThickness="0" Style="{StaticResource ListBoxCustom}" ItemsSource="{Binding DataList}">
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
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"
|
||||
DataContext="{Binding ImageBrowserDemo,Source={StaticResource Locator}}"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<hc:ImageViewer Background="{DynamicResource SecondaryRegionBrush}" Width="600" Height="330" ImageSource="/HandyControlDemo;component/Resources/Img/1.jpg"/>
|
||||
<Button Margin="0,32,0,0" Command="{Binding OpenImgCmd}" Content="{x:Static langs:Lang.OpenImageBrowser}" Style="{StaticResource ButtonPrimary}" HorizontalAlignment="Center"/>
|
||||
<Button Margin="0,32,0,0" Command="{Binding OpenImgCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenImageBrowser}}" Style="{StaticResource ButtonPrimary}" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -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 NotificationDemo,Source={StaticResource Locator}}"
|
||||
Width="300"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
@@ -10,8 +11,8 @@
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<ComboBox SelectedValue="{Binding ShowAnimation}" ItemsSource="{Binding Source={StaticResource ShowAnimations}}"/>
|
||||
<hc:ButtonGroup Margin="0,16,0,0">
|
||||
<ToggleButton Content="{x:Static langs:Lang.StaysOpen}" IsChecked="{Binding StaysOpen}"/>
|
||||
<Button Command="{Binding OpenCmd}" Content="{x:Static langs:Lang.SendNotification}"/>
|
||||
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.StaysOpen}}" IsChecked="{Binding StaysOpen}"/>
|
||||
<Button Command="{Binding OpenCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.SendNotification}}"/>
|
||||
</hc:ButtonGroup>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
DataContext="{Binding NotifyIconDemo,Source={StaticResource Locator}}"
|
||||
@@ -12,38 +13,38 @@
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<GroupBox Header="ContextMenu" Padding="10">
|
||||
<StackPanel>
|
||||
<GroupBox hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Visibility}">
|
||||
<GroupBox hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{ex:Lang Key={x:Static langs:LangKeys.Visibility}}">
|
||||
<ToggleButton IsChecked="{Binding ContextMenuIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{x:Static langs:Lang.Try2CloseApp}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Blink}">
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{ex:Lang Key={x:Static langs:LangKeys.Try2CloseApp}}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{ex:Lang Key={x:Static langs:LangKeys.Blink}}">
|
||||
<ToggleButton IsChecked="{Binding ContextMenuIsBlink}" IsEnabled="{Binding ContextMenuIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="ContextContent" Margin="16,0,0,0" Padding="10">
|
||||
<StackPanel>
|
||||
<GroupBox hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Visibility}">
|
||||
<GroupBox hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{ex:Lang Key={x:Static langs:LangKeys.Visibility}}">
|
||||
<ToggleButton IsChecked="{Binding ContextContentIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextContentIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{x:Static langs:Lang.Try2CloseApp}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Blink}">
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextContentIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{ex:Lang Key={x:Static langs:LangKeys.Try2CloseApp}}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{ex:Lang Key={x:Static langs:LangKeys.Blink}}">
|
||||
<ToggleButton IsChecked="{Binding ContextContentIsBlink}" IsEnabled="{Binding ContextContentIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
<DockPanel Margin="0,16,0,0" LastChildFill="True">
|
||||
<Button Command="{Binding SendNotificationCmd}" Content="{x:Static langs:Lang.SendNotification}" DockPanel.Dock="Right" HorizontalAlignment="Stretch" Margin="10,0,0,0"/>
|
||||
<Button Command="{Binding SendNotificationCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.SendNotification}}" DockPanel.Dock="Right" HorizontalAlignment="Stretch" Margin="10,0,0,0"/>
|
||||
<TextBox Text="{Binding Content}"/>
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<hc:NotifyIcon Token="{x:Static data:MessageToken.NotifyIconDemo}" Text="HandyControl" IsBlink="{Binding ContextMenuIsBlink}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||
<hc:NotifyIcon.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="{Binding SendNotificationCmd}" Header="{x:Static langs:Lang.SendNotification}"/>
|
||||
<MenuItem Command="hc:ControlCommands.PushMainWindow2Top" Header="{x:Static langs:Lang.OpenPanel}"/>
|
||||
<MenuItem Command="hc:ControlCommands.ShutdownApp" Header="{x:Static langs:Lang.Exit}"/>
|
||||
<MenuItem Command="{Binding SendNotificationCmd}" Header="{ex:Lang Key={x:Static langs:LangKeys.SendNotification}}"/>
|
||||
<MenuItem Command="hc:ControlCommands.PushMainWindow2Top" Header="{ex:Lang Key={x:Static langs:LangKeys.OpenPanel}}"/>
|
||||
<MenuItem Command="hc:ControlCommands.ShutdownApp" Header="{ex:Lang Key={x:Static langs:LangKeys.Exit}}"/>
|
||||
</ContextMenu>
|
||||
</hc:NotifyIcon.ContextMenu>
|
||||
<hc:Interaction.Triggers>
|
||||
@@ -61,8 +62,8 @@
|
||||
<StackPanel VerticalAlignment="Center" Margin="16">
|
||||
<Path Width="100" Height="100" Fill="#f06632" Data="{StaticResource LogoGeometry}"/>
|
||||
<StackPanel Margin="0,16,0,0" HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Button Click="ButtonPush_OnClick" Command="hc:ControlCommands.PushMainWindow2Top" MinWidth="100" Content="{x:Static langs:Lang.OpenPanel}"/>
|
||||
<Button Command="hc:ControlCommands.ShutdownApp" Margin="16,0,0,0" MinWidth="100" Style="{StaticResource ButtonPrimary}" Content="{x:Static langs:Lang.Exit}"/>
|
||||
<Button Click="ButtonPush_OnClick" Command="hc:ControlCommands.PushMainWindow2Top" MinWidth="100" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenPanel}}"/>
|
||||
<Button Command="hc:ControlCommands.ShutdownApp" Margin="16,0,0,0" MinWidth="100" Style="{StaticResource ButtonPrimary}" Content="{ex:Lang Key={x:Static langs:LangKeys.Exit}}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
@@ -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">
|
||||
@@ -11,20 +12,20 @@
|
||||
<hc:NumericUpDown Margin="0,32,0,0" IsEnabled="False"/>
|
||||
<hc:NumericUpDown Margin="0,32,0,0" IsReadOnly="True"/>
|
||||
|
||||
<hc:NumericUpDown hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownExtend}"/>
|
||||
<hc:NumericUpDown hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownExtend}"/>
|
||||
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource NumericUpDownExtend}" Margin="0,32,0,0"/>
|
||||
<hc:NumericUpDown 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}" Style="{StaticResource NumericUpDownExtend}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<hc:NumericUpDown hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownExtend}"/>
|
||||
<hc:NumericUpDown hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownExtend}"/>
|
||||
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownExtend}" Margin="0,32,0,0"/>
|
||||
<hc:NumericUpDown 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}}" Style="{StaticResource NumericUpDownExtend}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="32,0,0,0">
|
||||
<hc:NumericUpDown Name="NumericUpDownCustomVerify" ShowClearButton="True" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
<hc:NumericUpDown Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
<hc:NumericUpDown Margin="0,32,0,0" IsReadOnly="True" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
|
||||
<hc:NumericUpDown ShowClearButton="True" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
<hc:NumericUpDown hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource NumericUpDownPlus}" Margin="0,32,0,0"/>
|
||||
<hc:NumericUpDown DecimalPlaces="2" ShowClearButton="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}" Style="{StaticResource NumericUpDownPlus}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<hc:NumericUpDown ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
<hc:NumericUpDown hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownPlus}" Margin="0,32,0,0"/>
|
||||
<hc:NumericUpDown DecimalPlaces="2" ShowClearButton="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}}" Style="{StaticResource NumericUpDownPlus}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -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" Width="400">
|
||||
<hc:OutlineText TextWrapping="Wrap" Fill="{DynamicResource PrimaryTextBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=20}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" FontSize="30" Fill="{DynamicResource SuccessBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" Fill="{DynamicResource PrimaryTextBrush}" FontSize="30" FontStyle="Italic" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" FontSize="50" StrokeThickness="2" Fill="{DynamicResource DangerBrush}" Stroke="{DynamicResource PrimaryBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" StrokePosition="Outside" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" StrokePosition="InSide" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:OutlineText TextWrapping="Wrap" Fill="{DynamicResource PrimaryTextBrush}" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=20}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" FontSize="30" Fill="{DynamicResource SuccessBrush}" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" Fill="{DynamicResource PrimaryTextBrush}" FontSize="30" FontStyle="Italic" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" FontSize="50" StrokeThickness="2" Fill="{DynamicResource DangerBrush}" Stroke="{DynamicResource PrimaryBrush}" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" StrokePosition="Outside" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" StrokePosition="InSide" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -4,7 +4,8 @@
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
DataContext="{Binding PaginationDemo,Source={StaticResource Locator}}"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs">
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
|
||||
<hc:TransitioningContentControl>
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -25,7 +26,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>
|
||||
@@ -33,10 +34,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>
|
||||
</Grid>
|
||||
|
||||
@@ -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">
|
||||
<hc:PasswordBox ShowClearButton="True" Password="123456"/>
|
||||
<hc:PasswordBox Password="123456" Margin="0,16,0,0"/>
|
||||
|
||||
<hc:PasswordBox ShowClearButton="True" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Password="123456" Margin="0,32,0,0"/>
|
||||
<hc:PasswordBox ShowEyeButton="True" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<hc:PasswordBox ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Password="123456" Margin="0,32,0,0"/>
|
||||
<hc:PasswordBox ShowEyeButton="True" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
|
||||
<hc:PasswordBox ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Password="123456"/>
|
||||
<hc:PasswordBox ShowClearButton="True" ShowEyeButton="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" Margin="0,32,0,0"/>
|
||||
<hc:PasswordBox ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0" Password="123456"/>
|
||||
<hc:PasswordBox ShowClearButton="True" ShowEyeButton="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" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -3,6 +3,7 @@
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<UserControl.Resources>
|
||||
@@ -11,14 +12,14 @@
|
||||
<Setter Property="Height" Value="40"/>
|
||||
<Setter Property="MinWidth" Value="100"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="Content" Value="{Binding Tag,RelativeSource={RelativeSource Self},Converter={StaticResource Int2StringConverter},ConverterParameter={x:Static langs:Lang.PoptipPositionStr}}"/>
|
||||
<Setter Property="Content" Value="{Binding Tag,RelativeSource={RelativeSource Self},Converter={StaticResource Int2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.PoptipPositionStr}}}"/>
|
||||
</Style>
|
||||
<Style x:Key="ToggleButton4PoptipStyle" BasedOn="{StaticResource {x:Type ToggleButton}}" TargetType="ToggleButton">
|
||||
<Setter Property="Width" Value="{x:Static system:Double.NaN}"/>
|
||||
<Setter Property="Height" Value="40"/>
|
||||
<Setter Property="MinWidth" Value="100"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="Content" Value="{Binding Tag,RelativeSource={RelativeSource Self},Converter={StaticResource Int2StringConverter},ConverterParameter={x:Static langs:Lang.PoptipPositionStr}}"/>
|
||||
<Setter Property="Content" Value="{Binding Tag,RelativeSource={RelativeSource Self},Converter={StaticResource Int2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.PoptipPositionStr}}}"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<hc:TransitioningContentControl>
|
||||
@@ -36,7 +37,7 @@
|
||||
<UniformGrid Grid.Column="1" Columns="3">
|
||||
<Button Margin="8,0" Tag="0" Style="{StaticResource Button4PoptipStyle}">
|
||||
<hc:Poptip.Instance>
|
||||
<hc:Poptip Content="{x:Static langs:Lang.Text}" PlacementType="TopLeft"/>
|
||||
<hc:Poptip Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" PlacementType="TopLeft"/>
|
||||
</hc:Poptip.Instance>
|
||||
</Button>
|
||||
<Button Margin="8,0" Tag="1" Style="{StaticResource Button4PoptipStyle}">
|
||||
@@ -48,10 +49,10 @@
|
||||
</hc:Poptip>
|
||||
</hc:Poptip.Instance>
|
||||
</Button>
|
||||
<Button hc:Poptip.Content="{x:Static langs:Lang.Text}" hc:Poptip.Placement="TopRight" Margin="8,0" Tag="2" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="TopRight" Margin="8,0" Tag="2" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Row="1" Grid.Column="2" Rows="3">
|
||||
<ToggleButton hc:Poptip.HitMode="None" hc:Poptip.IsOpen="{Binding IsChecked,RelativeSource={RelativeSource Self}}" hc:Poptip.Content="{x:Static langs:Lang.Text}" hc:Poptip.Placement="RightTop" Margin="8,16" Tag="3" Style="{StaticResource ToggleButton4PoptipStyle}"/>
|
||||
<ToggleButton hc:Poptip.HitMode="None" hc:Poptip.IsOpen="{Binding IsChecked,RelativeSource={RelativeSource Self}}" hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="RightTop" Margin="8,16" Tag="3" Style="{StaticResource ToggleButton4PoptipStyle}"/>
|
||||
<ToggleButton Margin="8,16" Tag="4" Style="{StaticResource ToggleButton4PoptipStyle}">
|
||||
<hc:Poptip.Instance>
|
||||
<hc:Poptip Background="Transparent" Padding="0" BorderThickness="0" HitMode="None" PlacementType="Right" IsOpen="{Binding Target.IsChecked,RelativeSource={RelativeSource Self}}">
|
||||
@@ -61,17 +62,17 @@
|
||||
</hc:Poptip>
|
||||
</hc:Poptip.Instance>
|
||||
</ToggleButton>
|
||||
<ToggleButton hc:Poptip.HitMode="None" hc:Poptip.IsOpen="{Binding IsChecked,RelativeSource={RelativeSource Self}}" hc:Poptip.Content="{x:Static langs:Lang.Text}" hc:Poptip.Placement="RightBottom" Margin="8,16" Tag="5" Style="{StaticResource ToggleButton4PoptipStyle}"/>
|
||||
<ToggleButton hc:Poptip.HitMode="None" hc:Poptip.IsOpen="{Binding IsChecked,RelativeSource={RelativeSource Self}}" hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="RightBottom" Margin="8,16" Tag="5" Style="{StaticResource ToggleButton4PoptipStyle}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="1" Grid.Row="2" Columns="3">
|
||||
<Button hc:Poptip.Content="{x:Static langs:Lang.Text}" hc:Poptip.Placement="BottomLeft" Margin="8,0" Tag="8" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{x:Static langs:Lang.Text}" hc:Poptip.Placement="Bottom" Margin="8,0" Tag="7" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{x:Static langs:Lang.Text}" hc:Poptip.Placement="BottomRight" Margin="8,0" Tag="6" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="BottomLeft" Margin="8,0" Tag="8" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="Bottom" Margin="8,0" Tag="7" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="BottomRight" Margin="8,0" Tag="6" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Row="1" Grid.Column="0" Rows="3">
|
||||
<Button hc:Poptip.Content="{x:Static langs:Lang.Text}" hc:Poptip.Placement="LeftTop" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="11" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{x:Static langs:Lang.Text}" hc:Poptip.Placement="Left" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="10" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{x:Static langs:Lang.Text}" hc:Poptip.Placement="LeftBottom" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="9" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="LeftTop" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="11" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="Left" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="10" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="LeftBottom" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="9" Style="{StaticResource Button4PoptipStyle}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
+13
-12
@@ -2,25 +2,26 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<WrapPanel Margin="16" VerticalAlignment="Center">
|
||||
<StackPanel Margin="16" Button.Click="ButtonProgress_OnClick">
|
||||
<hc:ProgressButton IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonPrimary}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonSuccess}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonInfo}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonWarning}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonDanger}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonPrimary}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonSuccess}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonInfo}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonWarning}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<hc:ProgressButton Style="{StaticResource ProgressButtonDanger}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="16" Button.Click="ButtonProgress_OnClick">
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoading}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingPrimary}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingSuccess}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingInfo}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingWarning}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingDanger}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoading}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingPrimary}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingSuccess}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingInfo}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingWarning}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonLoadingDanger}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.UploadStr}}}" Width="180" Margin="5"/>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -3,17 +3,18 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs">
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<hc:RunningBlock Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<hc:RunningBlock Runaway="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="100" Runaway="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Duration="0:0:2" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock HorizontalAlignment="Left" AutoReverse="True" AutoRun="True" Width="100" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="200" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" FontSize="20" FontWeight="Bold" Foreground="OrangeRed" Duration="0:0:10" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock AutoReverse="True" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" FontSize="20" FontWeight="Bold" Foreground="OrangeRed" Duration="0:0:10" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock Orientation="Vertical" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" FontSize="20" FontWeight="Bold" Foreground="OrangeRed" Duration="0:0:4" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<hc:RunningBlock Runaway="False" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="100" Runaway="False" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Duration="0:0:2" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock HorizontalAlignment="Left" AutoReverse="True" AutoRun="True" Width="100" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="200" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" FontSize="20" FontWeight="Bold" Foreground="OrangeRed" Duration="0:0:10" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock AutoReverse="True" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" FontSize="20" FontWeight="Bold" Foreground="OrangeRed" Duration="0:0:10" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock Orientation="Vertical" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" FontSize="20" FontWeight="Bold" Foreground="OrangeRed" Duration="0:0:4" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock Margin="0,16,0,0" Duration="0:0:20" IsRunning="{Binding IsMouseOver,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2BooleanReConverter}}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/1.gif" Margin="10,0" Width="30" Height="30"/>
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
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>
|
||||
<Button Content="{x:Static langs:Lang.StartScreenshot}" Command="hc:ControlCommands.StartScreenshot"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.StartScreenshot}}" Command="hc:ControlCommands.StartScreenshot"/>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -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,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 SearchBarDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
@@ -11,19 +12,19 @@
|
||||
<hc:SearchBar Command="{Binding SearchCmd}" CommandParameter="{Binding Text,RelativeSource={RelativeSource Self}}"/>
|
||||
<hc:SearchBar Margin="0,32,0,0" IsEnabled="False"/>
|
||||
|
||||
<hc:SearchBar hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Style="{StaticResource SearchBarExtend}"/>
|
||||
<hc:SearchBar hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarExtend}"/>
|
||||
<hc:SearchBar 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}" Style="{StaticResource SearchBarExtend}" Margin="0,32,0,0"/>
|
||||
<hc:SearchBar 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}" Style="{StaticResource SearchBarExtend}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<hc:SearchBar hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource SearchBarExtend}"/>
|
||||
<hc:SearchBar hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarExtend}"/>
|
||||
<hc:SearchBar 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}}" Style="{StaticResource SearchBarExtend}" Margin="0,32,0,0"/>
|
||||
<hc:SearchBar 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}}" Style="{StaticResource SearchBarExtend}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="32,0,0,0">
|
||||
<hc:SearchBar Name="SearchBarCustomVerify" ShowClearButton="True" Style="{StaticResource SearchBarPlus}"/>
|
||||
<hc:SearchBar Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource SearchBarPlus}"/>
|
||||
|
||||
<hc:SearchBar ShowClearButton="True" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Style="{StaticResource SearchBarPlus}"/>
|
||||
<hc:SearchBar TextType="Mail" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterEmail}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarPlus}"/>
|
||||
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource SearchBarPlus}" Margin="0,32,0,0"/>
|
||||
<hc:SearchBar ShowClearButton="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}" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<hc:SearchBar ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource SearchBarPlus}"/>
|
||||
<hc:SearchBar TextType="Mail" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterEmail}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarPlus}"/>
|
||||
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarPlus}" Margin="0,32,0,0"/>
|
||||
<hc:SearchBar ShowClearButton="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}}" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -3,34 +3,35 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
||||
DataContext="{Binding SplitButtonDemo,Source={StaticResource Locator}}">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<hc:SplitButton Margin="0,0,0,10" Content="{x:Static langs:Lang.Default}" Command="{Binding SelectCmd}" CommandParameter="Command0" HorizontalAlignment="Stretch">
|
||||
<hc:SplitButton Margin="0,0,0,10" Content="{ex:Lang Key={x:Static langs:LangKeys.Default}}" Command="{Binding SelectCmd}" CommandParameter="Command0" HorizontalAlignment="Stretch">
|
||||
<hc:SplitButton.DropDownContent>
|
||||
<StackPanel>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command1"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command2"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command3"/>
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Command="{Binding SelectCmd}" CommandParameter="Command1"/>
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Command="{Binding SelectCmd}" CommandParameter="Command2"/>
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Command="{Binding SelectCmd}" CommandParameter="Command3"/>
|
||||
</StackPanel>
|
||||
</hc:SplitButton.DropDownContent>
|
||||
</hc:SplitButton>
|
||||
<hc:SplitButton Style="{StaticResource SplitButtonPrimary}" Margin="0,0,0,10" Content="{x:Static langs:Lang.Primary}" Command="{Binding SelectCmd}" CommandParameter="Command0" HorizontalAlignment="Stretch">
|
||||
<hc:SplitButton Style="{StaticResource SplitButtonPrimary}" Margin="0,0,0,10" Content="{ex:Lang Key={x:Static langs:LangKeys.Primary}}" Command="{Binding SelectCmd}" CommandParameter="Command0" HorizontalAlignment="Stretch">
|
||||
<hc:SplitButton.DropDownContent>
|
||||
<StackPanel>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command1"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command2"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command3"/>
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Command="{Binding SelectCmd}" CommandParameter="Command1"/>
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Command="{Binding SelectCmd}" CommandParameter="Command2"/>
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Command="{Binding SelectCmd}" CommandParameter="Command3"/>
|
||||
</StackPanel>
|
||||
</hc:SplitButton.DropDownContent>
|
||||
</hc:SplitButton>
|
||||
<hc:SplitButton Style="{StaticResource SplitButtonWarning}" Margin="0,0,0,10" Content="{x:Static langs:Lang.Warning}" HitMode="Hover" HorizontalAlignment="Stretch">
|
||||
<hc:SplitButton Style="{StaticResource SplitButtonWarning}" Margin="0,0,0,10" Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" HitMode="Hover" HorizontalAlignment="Stretch">
|
||||
<hc:SplitButton.DropDownContent>
|
||||
<StackPanel>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command1"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command2"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command3"/>
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Command="{Binding SelectCmd}" CommandParameter="Command1"/>
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Command="{Binding SelectCmd}" CommandParameter="Command2"/>
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Command="{Binding SelectCmd}" CommandParameter="Command3"/>
|
||||
</StackPanel>
|
||||
</hc:SplitButton.DropDownContent>
|
||||
</hc:SplitButton>
|
||||
|
||||
@@ -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"
|
||||
DataContext="{Binding SpriteDemo,Source={StaticResource Locator}}"
|
||||
Width="300"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<Button Margin="32" Command="{Binding OpenCmd}" Content="{x:Static langs:Lang.OpenSprite}"/>
|
||||
<Button Margin="32" Command="{Binding OpenCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenSprite}}"/>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -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 StepBarDemo,Source={StaticResource Locator}}"
|
||||
FocusManager.FocusedElement="{Binding RelativeSource={x:Static RelativeSource.Self}, Mode=OneTime}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
@@ -19,20 +20,20 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<hc:StepBar Grid.ColumnSpan="2" StepIndex="{Binding StepIndex}">
|
||||
<hc:StepBarItem Content="{x:Static langs:Lang.Register}"/>
|
||||
<hc:StepBarItem Content="{x:Static langs:Lang.BasicInfo}"/>
|
||||
<hc:StepBarItem Content="{x:Static langs:Lang.UploadFile}"/>
|
||||
<hc:StepBarItem Content="{x:Static langs:Lang.Complete}"/>
|
||||
<hc:StepBarItem Content="{ex:Lang Key={x:Static langs:LangKeys.Register}}"/>
|
||||
<hc:StepBarItem Content="{ex:Lang Key={x:Static langs:LangKeys.BasicInfo}}"/>
|
||||
<hc:StepBarItem Content="{ex:Lang Key={x:Static langs:LangKeys.UploadFile}}"/>
|
||||
<hc:StepBarItem Content="{ex:Lang Key={x:Static langs:LangKeys.Complete}}"/>
|
||||
</hc:StepBar>
|
||||
<StackPanel Margin="0,32" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Center">
|
||||
<Button Command="{Binding PrevCmd}" CommandParameter="{Binding ElementName=PanelMain}" Width="180" Content="{x:Static langs:Lang.Prev}" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button Command="{Binding NextCmd}" CommandParameter="{Binding ElementName=PanelMain}" Width="180" Margin="0,16,0,0" Content="{x:Static langs:Lang.Next}" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button Command="{Binding PrevCmd}" CommandParameter="{Binding ElementName=PanelMain}" Width="180" Content="{ex:Lang Key={x:Static langs:LangKeys.Prev}}" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button Command="{Binding NextCmd}" CommandParameter="{Binding ElementName=PanelMain}" Width="180" Margin="0,16,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.Next}}" Style="{StaticResource ButtonPrimary}"/>
|
||||
</StackPanel>
|
||||
<hc:StepBar Margin="0,0,0,32" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Dock="Bottom">
|
||||
<hc:StepBarItem Content="{x:Static langs:Lang.Register}"/>
|
||||
<hc:StepBarItem Content="{x:Static langs:Lang.BasicInfo}"/>
|
||||
<hc:StepBarItem Content="{x:Static langs:Lang.UploadFile}"/>
|
||||
<hc:StepBarItem Content="{x:Static langs:Lang.Complete}"/>
|
||||
<hc:StepBarItem Content="{ex:Lang Key={x:Static langs:LangKeys.Register}}"/>
|
||||
<hc:StepBarItem Content="{ex:Lang Key={x:Static langs:LangKeys.BasicInfo}}"/>
|
||||
<hc:StepBarItem Content="{ex:Lang Key={x:Static langs:LangKeys.UploadFile}}"/>
|
||||
<hc:StepBarItem Content="{ex:Lang Key={x:Static langs:LangKeys.Complete}}"/>
|
||||
</hc:StepBar>
|
||||
<hc:StepBar Grid.Column="0" Grid.Row="3" ItemsSource="{Binding DataList}" Dock="Left">
|
||||
<hc:StepBar.ItemTemplate>
|
||||
|
||||
@@ -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>
|
||||
<hc:TagPanel AddTagButtonClick="TagPanel_OnAddTagButtonClick" Margin="32" Orientation="Horizontal" MaxWidth="400" VerticalAlignment="Center" ShowAddButton="True">
|
||||
<hc:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:Tag Selectable="True" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<hc:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<hc:Tag Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<hc:Tag IsSelected="True" Selectable="True" ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<hc:Tag Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<hc:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:Tag IsSelected="True" Selectable="True" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<hc:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<hc:Tag Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<hc:Tag ShowCloseButton="False" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:Tag Selectable="True" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<hc:Tag ShowCloseButton="False" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<hc:Tag Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<hc:Tag IsSelected="True" Selectable="True" ShowCloseButton="False" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<hc:Tag Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<hc:Tag ShowCloseButton="False" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:Tag IsSelected="True" Selectable="True" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<hc:Tag ShowCloseButton="False" Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<hc:Tag Content="{Binding Source={ex:Lang Key={x:Static langs:LangKeys.Text}}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
</hc:TagPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -3,16 +3,17 @@
|
||||
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">
|
||||
<hc:TextBox ShowClearButton="True" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<hc:TextBox Text="{x:Static langs:Lang.ContentDemoStr}" Margin="0,16,0,0" IsEnabled="False"/>
|
||||
<hc:TextBox ShowClearButton="True" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
|
||||
<hc:TextBox Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" Margin="0,16,0,0" IsEnabled="False"/>
|
||||
|
||||
<hc:TextBox ShowClearButton="True" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<hc:TextBox TextType="Mail" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterEmail}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:TextBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<hc:TextBox ShowClearButton="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" Margin="0,16,0,0"/>
|
||||
<hc:TextBox ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
|
||||
<hc:TextBox TextType="Mail" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterEmail}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:TextBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
|
||||
<hc:TextBox ShowClearButton="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" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -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">
|
||||
@@ -10,11 +11,11 @@
|
||||
<hc:TimePicker ShowClearButton="True"/>
|
||||
<hc:TimePicker Margin="0,16,0,0" IsEnabled="False"/>
|
||||
|
||||
<hc:TimePicker ShowClearButton="True" Style="{StaticResource TimePickerExtend}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<hc:TimePicker hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource TimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:TimePicker ShowClearButton="True" Style="{StaticResource TimePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
|
||||
<hc:TimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource TimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<hc:TimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource TimePickerExtend}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<hc:TimePicker 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 TimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:TimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource TimePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
|
||||
<hc:TimePicker 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 TimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="32,0,0,0">
|
||||
<hc:TimePicker ShowClearButton="True" Style="{StaticResource TimePickerPlus}">
|
||||
@@ -24,11 +25,11 @@
|
||||
</hc:TimePicker>
|
||||
<hc:TimePicker Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource TimePickerPlus}"/>
|
||||
|
||||
<hc:TimePicker ShowClearButton="True" Style="{StaticResource TimePickerPlus}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<hc:TimePicker hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource TimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:TimePicker ShowClearButton="True" Style="{StaticResource TimePickerPlus}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
|
||||
<hc:TimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource TimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<hc:TimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource TimePickerPlus}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<hc:TimePicker 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 TimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<hc:TimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource TimePickerPlus}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
|
||||
<hc:TimePicker 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 TimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
+12
-11
@@ -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>
|
||||
<Grid Margin="32">
|
||||
@@ -10,43 +11,43 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<hc:NumericUpDown x:Name="UpDownGroups" HorizontalAlignment="Center" Value="2" Minimum="1" Maximum="3" Width="200" Style="{StaticResource NumericUpDownExtend}" hc:TitleElement.Title="{x:Static langs:Lang.Groups}" hc:TitleElement.TitleWidth="50" hc:TitleElement.TitleAlignment="Left"/>
|
||||
<hc:NumericUpDown x:Name="UpDownGroups" HorizontalAlignment="Center" Value="2" Minimum="1" Maximum="3" Width="200" Style="{StaticResource NumericUpDownExtend}" hc:TitleElement.Title="{ex:Lang Key={x:Static langs:LangKeys.Groups}}" hc:TitleElement.TitleWidth="50" hc:TitleElement.TitleAlignment="Left"/>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,16,0,0">
|
||||
<hc:ScrollViewer MaxHeight="300">
|
||||
<hc:WaterfallPanel VerticalAlignment="Center" Width="300" Groups="{Binding Value,ElementName=UpDownGroups}" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
|
||||
<Border Height="100" Background="{DynamicResource PrimaryBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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 Height="140" Background="{DynamicResource DangerBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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 Height="100" Background="{DynamicResource SuccessBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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 Height="170" Background="{DynamicResource InfoBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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 Height="100" Background="{DynamicResource WarningBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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>
|
||||
</hc:WaterfallPanel>
|
||||
</hc:ScrollViewer>
|
||||
<hc:ScrollViewer Margin="32,0,0,0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" Orientation="Horizontal" MaxWidth="300">
|
||||
<hc:WaterfallPanel VerticalAlignment="Center" Height="300" Orientation="Vertical" Groups="{Binding Value,ElementName=UpDownGroups}" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
|
||||
<Border Width="100" Background="{DynamicResource PrimaryBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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 Width="140" Background="{DynamicResource DangerBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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 Width="100" Background="{DynamicResource SuccessBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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 Width="170" Background="{DynamicResource InfoBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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 Width="100" Background="{DynamicResource WarningBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<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>
|
||||
</hc:WaterfallPanel>
|
||||
</hc:ScrollViewer>
|
||||
|
||||
@@ -3,21 +3,22 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
DataContext="{Binding WindowDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<UniformGrid Margin="32" Columns="3" Rows="3" Height="200">
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.CommonWindow}" Content="{x:Static langs:Lang.OpenCommonWindow}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.BlurWindow}" Content="{x:Static langs:Lang.OpenBlurWindow}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.CustomNonClientAreaWindow}" Content="{x:Static langs:Lang.OpenCustomNonClientAreaWindow}"/>
|
||||
<Button Click="ButtonMessage_OnClick" Content="{x:Static langs:Lang.OpenMessageWindow}"/>
|
||||
<Button Click="ButtonCustomMessage_OnClick" Content="{x:Static langs:Lang.OpenCustomMessageWindow}"/>
|
||||
<Button Click="ButtonCustomContent_OnClick" Content="{x:Static langs:Lang.OpenCustomContentWindow}"/>
|
||||
<Button Name="ButtonMouseFollow" Click="ButtonMouseFollow_OnClick" Content="{x:Static langs:Lang.OpenMouseFollowWindow}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.NoNonClientAreaDragableWindow}" Content="{x:Static langs:Lang.OpenNoNonClientAreaDragableWindow}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.CommonWindow}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenCommonWindow}}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.BlurWindow}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenBlurWindow}}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.CustomNonClientAreaWindow}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenCustomNonClientAreaWindow}}"/>
|
||||
<Button Click="ButtonMessage_OnClick" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenMessageWindow}}"/>
|
||||
<Button Click="ButtonCustomMessage_OnClick" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenCustomMessageWindow}}"/>
|
||||
<Button Click="ButtonCustomContent_OnClick" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenCustomContentWindow}}"/>
|
||||
<Button Name="ButtonMouseFollow" Click="ButtonMouseFollow_OnClick" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenMouseFollowWindow}}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.NoNonClientAreaDragableWindow}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenNoNonClientAreaDragableWindow}}"/>
|
||||
<hc:Badge Text="New" Style="{StaticResource BadgeDanger}" VerticalAlignment="Center" HorizontalAlignment="Center" BadgeMargin="0,-10,-20,0">
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.GlowWindow}" Content="{x:Static langs:Lang.OpenGlowWindow}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.GlowWindow}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenGlowWindow}}"/>
|
||||
</hc:Badge>
|
||||
</UniformGrid>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
Margin="16"
|
||||
CornerRadius="10"
|
||||
@@ -25,7 +26,7 @@
|
||||
</Style>
|
||||
</Border.Resources>
|
||||
<DockPanel>
|
||||
<Button Command="{Binding OpenPracticalDemoCmd}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" Margin="10,10,10,4" Content="{x:Static langs:Lang.PracticalDemos}" BorderThickness="0" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
<Button Command="{Binding OpenPracticalDemoCmd}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" Margin="10,10,10,4" Content="{ex:Lang Key={x:Static langs:LangKeys.PracticalDemos}}" BorderThickness="0" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
<TabControl SelectionChanged="TabControl_OnSelectionChanged" ItemContainerStyle="{StaticResource TabItemTransparent}" ItemsSource="{Binding DemoInfoList}" Style="{StaticResource TabControlInLine}" Background="Transparent" SelectedIndex="0">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
@@ -43,7 +44,7 @@
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="0,4,4,4" Tag="{Binding ElementName=ListBoxDemo}"/>
|
||||
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterKey}}" Margin="0,4,4,4" Tag="{Binding ElementName=ListBoxDemo}"/>
|
||||
<ToggleButton Tag="{Binding ElementName=ListBoxDemo}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Style="{StaticResource DemoInfoSortButtonStyle}"/>
|
||||
<ListBox Name="ListBoxDemo" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" VirtualizingStackPanel.IsVirtualizing="True" SelectedIndex="{Binding SelectedIndex}" ItemsSource="{Binding DemoItemList}" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBox.ItemTemplate>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Height="29"
|
||||
DataContext="{Binding NoUser,Source={StaticResource Locator}}"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
@@ -12,7 +13,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel VerticalAlignment="Stretch" Orientation="Horizontal">
|
||||
<Menu Margin="10,0,0,0" Background="Transparent">
|
||||
<MenuItem Height="29" Header="{x:Static langs:Lang.Repository}">
|
||||
<MenuItem Height="29" Header="{ex:Lang Key={x:Static langs:LangKeys.Repository}}">
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://github.com/NaBian/HandyControl" Header="GitHub">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource GithubGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
@@ -23,39 +24,39 @@
|
||||
<Path Data="{StaticResource NugetGeometry}" Fill="#30a5dd"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://marketplace.visualstudio.com/items?itemName=HandyOrg.handycontrolforvs2019" Header="{x:Static langs:Lang.Vsix}">
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://marketplace.visualstudio.com/items?itemName=HandyOrg.handycontrolforvs2019" Header="{ex:Lang Key={x:Static langs:LangKeys.Vsix}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource VisualStudioGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Height="29" Header="{x:Static langs:Lang.About}">
|
||||
<MenuItem Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.ContributorsView}" Header="{x:Static langs:Lang.Contributors}">
|
||||
<MenuItem Height="29" Header="{ex:Lang Key={x:Static langs:LangKeys.About}}">
|
||||
<MenuItem Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.ContributorsView}" Header="{ex:Lang Key={x:Static langs:LangKeys.Contributors}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource ContributorsGeometry}" Fill="#ef6c00"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.QQGroupView}" Header="{x:Static langs:Lang.QQGroup}">
|
||||
<MenuItem Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.QQGroupView}" Header="{ex:Lang Key={x:Static langs:LangKeys.QQGroup}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource QqGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="mailto:836904362@qq.com" Header="{x:Static langs:Lang.Email}">
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="mailto:836904362@qq.com" Header="{ex:Lang Key={x:Static langs:LangKeys.Email}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource EmailGeometry}" Fill="{DynamicResource WarningBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://gitter.im/HandyControl/Lobby" Header="{x:Static langs:Lang.Chatroom}">
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://gitter.im/HandyControl/Lobby" Header="{ex:Lang Key={x:Static langs:LangKeys.Chatroom}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource GitterGeometry}" Fill="#e52e64"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://www.cnblogs.com/nabian" Header="{x:Static langs:Lang.Blog}">
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://www.cnblogs.com/nabian" Header="{ex:Lang Key={x:Static langs:LangKeys.Blog}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Demo}">
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Demo}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource CodeGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
@@ -65,7 +66,7 @@
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Documentation}">
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Documentation}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource DocGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
@@ -74,35 +75,35 @@
|
||||
<Path Data="{StaticResource WikiGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://ghost1372.github.io" Header="{x:Static langs:Lang.Doc_en}">
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://ghost1372.github.io" Header="{ex:Lang Key={x:Static langs:LangKeys.Doc_en}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource LogoGeometry}" Fill="#ef6c00"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://handyorg.github.io" Header="{x:Static langs:Lang.Doc_cn}">
|
||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://handyorg.github.io" Header="{ex:Lang Key={x:Static langs:LangKeys.Doc_cn}}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource LogoGeometry}" Fill="#ef6c00"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.About}" Click="MenuAbout_OnClick">
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.About}}" Click="MenuAbout_OnClick">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource InfoGeometry}" Fill="{DynamicResource SuccessBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Height="29" Header="{x:Static langs:Lang.Recommendation}">
|
||||
<MenuItem Header="{x:Static langs:Lang.Project}" Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.ProjectsView}" >
|
||||
<MenuItem Height="29" Header="{ex:Lang Key={x:Static langs:LangKeys.Recommendation}}">
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Project}}" Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.ProjectsView}" >
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource ProjectGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Blog}" Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.BlogsView}" >
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Blog}}" Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.BlogsView}" >
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource BlogGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Website}" Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.WebsitesView}" >
|
||||
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Website}}" Command="{Binding OpenViewCmd}" CommandParameter="{x:Static data:MessageToken.WebsitesView}" >
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource WebsiteGeometry}" Fill="{DynamicResource WarningBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.Properties.Langs;
|
||||
using HandyControlDemo.Window;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
@@ -26,10 +28,12 @@ namespace HandyControlDemo.UserControl
|
||||
if (!b) return true;
|
||||
GlobalData.Config.Lang = tag;
|
||||
GlobalData.Save();
|
||||
var processModule = Process.GetCurrentProcess().MainModule;
|
||||
if (processModule != null)
|
||||
Process.Start(processModule.FileName);
|
||||
Application.Current.Shutdown();
|
||||
|
||||
LangDecorator.Culture = new CultureInfo(tag);
|
||||
//var processModule = Process.GetCurrentProcess().MainModule;
|
||||
//if (processModule != null)
|
||||
// Process.Start(processModule.FileName);
|
||||
//Application.Current.Shutdown();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
@@ -11,7 +12,7 @@
|
||||
<BitmapImage UriSource="/HandyControlDemo;component/Resources/Img/under_construction.gif"/>
|
||||
</hc:GifImage.Source>
|
||||
</hc:GifImage>
|
||||
<TextBlock Margin="0,16,0,0" HorizontalAlignment="Center" Text="{x:Static langs:Lang.ComingSoon}" Style="{StaticResource TextBlockLargeBold}"/>
|
||||
<TextBlock Margin="0,16,0,0" HorizontalAlignment="Center" Text="{ex:Lang Key={x:Static langs:LangKeys.ComingSoon}}" Style="{StaticResource TextBlockLargeBold}"/>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -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>
|
||||
|
||||
+11
-10
@@ -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>
|
||||
|
||||
+41
-40
@@ -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>
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
mc:Ignorable="d"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Title="{x:Static langs:Lang.About}"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.About}}"
|
||||
ShowTitle="True"
|
||||
BorderThickness="1"
|
||||
BorderBrush="#262e2f"
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
mc:Ignorable="d"
|
||||
OtherButtonForeground="{DynamicResource ReverseTextBrush}"
|
||||
@@ -13,7 +14,7 @@
|
||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ShowTitle="False"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800">
|
||||
<hc:Window.NonClientAreaContent>
|
||||
|
||||
@@ -3,16 +3,17 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
hc:Dialog.Token="{x:Static data:MessageToken.DialogDemoWindow}"
|
||||
DataContext="{Binding DialogDemo,Source={StaticResource Locator}}"
|
||||
Title="{x:Static langs:Lang.DialogDemo}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.DialogDemo}}"
|
||||
Width="800"
|
||||
Height="500">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<Button Content="{x:Static langs:Lang.ShowInCurrentWindow}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{x:Static data:MessageToken.DialogDemoWindow}"/>
|
||||
<Button Margin="0,10,0,0" Content="{x:Static langs:Lang.ShowInMainWindow}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{x:Static data:MessageToken.MainWindow}"/>
|
||||
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.ShowInCurrentWindow}}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{x:Static data:MessageToken.DialogDemoWindow}"/>
|
||||
<Button Margin="0,10,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.ShowInMainWindow}}" Command="{Binding ShowWithTokenCmd}" CommandParameter="{x:Static data:MessageToken.MainWindow}"/>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</Window>
|
||||
@@ -5,10 +5,11 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
ActiveGlowColor="{DynamicResource PrimaryColor}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
|
||||
@@ -3,21 +3,22 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
DataContext="{Binding GrowlDemoWithToken,Source={StaticResource Locator}}"
|
||||
Title="{x:Static langs:Lang.GrowlDemo}"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.GrowlDemo}}"
|
||||
Width="800"
|
||||
Height="500">
|
||||
<hc:TransitioningContentControl>
|
||||
<hc:SimplePanel Margin="32">
|
||||
<WrapPanel>
|
||||
<Button Command="{Binding InfoCmd}" Content="{x:Static langs:Lang.Info}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{x:Static langs:Lang.Error}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{x:Static langs:Lang.Ask}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button Command="{Binding InfoCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Info}}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Success}}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Warning}}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Error}}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Ask}}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Fatal}}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.Clear}}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
<hc:ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsInertiaEnabled="True" IsPenetrating="True">
|
||||
<StackPanel hc:Growl.Token="{x:Static data:MessageToken.GrowlDemoPanel}" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Title="{x:Static langs:Lang.Title}"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ShowTitle="True"
|
||||
@@ -16,7 +17,7 @@
|
||||
<hc:SimplePanel>
|
||||
<Rectangle VerticalAlignment="Top" Margin="10" Height="30" RadiusX="4" RadiusY="4" Stroke="{DynamicResource BorderBrush}" StrokeDashArray="2,2"/>
|
||||
<Border hc:WindowAttach.IsDragElement="True" VerticalAlignment="Top" Margin="11" Height="28" Background="{DynamicResource DarkDefaultBrush}" CornerRadius="4">
|
||||
<TextBlock Text="{x:Static langs:Lang.DragHere}" Style="{StaticResource TextBlockDefault}"/>
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.DragHere}}" Style="{StaticResource TextBlockDefault}"/>
|
||||
</Border>
|
||||
<Button Click="ButtonClose_OnClick" HorizontalAlignment="Right" Margin="0,15,15,0" VerticalAlignment="Top" Padding="0" Height="20" Width="20" Style="{StaticResource ButtonPrimary}" hc:IconElement.Geometry="{StaticResource CloseGeometry}" hc:BorderElement.CornerRadius="15"/>
|
||||
</hc:SimplePanel>
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\ThicknessSplitConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\DependencyObjectExtension.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\FrameworkElementExtension.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\LangExtension.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\StringExtension.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\ValueExtension.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\GlobalShortcut.cs" />
|
||||
|
||||
@@ -0,0 +1,448 @@
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using HandyControl.Tools;
|
||||
|
||||
namespace HandyControl.Properties.Langs
|
||||
{
|
||||
public class LangDecorator : INotifyPropertyChanged
|
||||
{
|
||||
internal static LangDecorator Instance => ResourceHelper.GetResource<LangDecorator>("Langs");
|
||||
|
||||
private static string CultureInfoStr;
|
||||
|
||||
public static CultureInfo Culture
|
||||
{
|
||||
get => Lang.Culture;
|
||||
set
|
||||
{
|
||||
if (value == null) return;
|
||||
if (Equals(CultureInfoStr, value.EnglishName)) return;
|
||||
Lang.Culture = value;
|
||||
CultureInfoStr = value.EnglishName;
|
||||
|
||||
Instance.UpdateLangs();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateLangs()
|
||||
{
|
||||
OnPropertyChanged(nameof(Am));
|
||||
OnPropertyChanged(nameof(Cancel));
|
||||
OnPropertyChanged(nameof(CannotRegisterCompositeCommandInItself));
|
||||
OnPropertyChanged(nameof(CannotRegisterSameCommandTwice));
|
||||
OnPropertyChanged(nameof(Clear));
|
||||
OnPropertyChanged(nameof(Close));
|
||||
OnPropertyChanged(nameof(CloseAll));
|
||||
OnPropertyChanged(nameof(CloseOther));
|
||||
OnPropertyChanged(nameof(Confirm));
|
||||
OnPropertyChanged(nameof(ErrorImgPath));
|
||||
OnPropertyChanged(nameof(ErrorImgSize));
|
||||
OnPropertyChanged(nameof(Find));
|
||||
OnPropertyChanged(nameof(FormatError));
|
||||
OnPropertyChanged(nameof(Interval10m));
|
||||
OnPropertyChanged(nameof(Interval1h));
|
||||
OnPropertyChanged(nameof(Interval1m));
|
||||
OnPropertyChanged(nameof(Interval2h));
|
||||
OnPropertyChanged(nameof(Interval30m));
|
||||
OnPropertyChanged(nameof(Interval30s));
|
||||
OnPropertyChanged(nameof(Interval5m));
|
||||
OnPropertyChanged(nameof(IsNecessary));
|
||||
OnPropertyChanged(nameof(NextPage));
|
||||
OnPropertyChanged(nameof(No));
|
||||
OnPropertyChanged(nameof(OutOfRange));
|
||||
OnPropertyChanged(nameof(PageMode));
|
||||
OnPropertyChanged(nameof(Pm));
|
||||
OnPropertyChanged(nameof(PngImg));
|
||||
OnPropertyChanged(nameof(PreviousPage));
|
||||
OnPropertyChanged(nameof(ScrollMode));
|
||||
OnPropertyChanged(nameof(Tip));
|
||||
OnPropertyChanged(nameof(TooLarge));
|
||||
OnPropertyChanged(nameof(TwoPageMode));
|
||||
OnPropertyChanged(nameof(Unknown));
|
||||
OnPropertyChanged(nameof(UnknownSize));
|
||||
OnPropertyChanged(nameof(Yes));
|
||||
OnPropertyChanged(nameof(ZoomIn));
|
||||
OnPropertyChanged(nameof(ZoomOut));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 上午 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Am => Lang.Am;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 取消 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Cancel => Lang.Cancel;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 无法自注册复合命令 的本地化字符串。
|
||||
/// </summary>
|
||||
public string CannotRegisterCompositeCommandInItself => Lang.CannotRegisterCompositeCommandInItself;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 不能注册同一命令两次 的本地化字符串。
|
||||
/// </summary>
|
||||
public string CannotRegisterSameCommandTwice => Lang.CannotRegisterSameCommandTwice;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 清空 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Clear => Lang.Clear;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 关闭 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Close => Lang.Close;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 关闭所有 的本地化字符串。
|
||||
/// </summary>
|
||||
public string CloseAll => Lang.CloseAll;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 关闭其他 的本地化字符串。
|
||||
/// </summary>
|
||||
public string CloseOther => Lang.CloseOther;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 确定 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Confirm => Lang.Confirm;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 错误的图片路径 的本地化字符串。
|
||||
/// </summary>
|
||||
public string ErrorImgPath => Lang.ErrorImgPath;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 非法的图片尺寸 的本地化字符串。
|
||||
/// </summary>
|
||||
public string ErrorImgSize => Lang.ErrorImgSize;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 查找 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Find => Lang.Find;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 格式错误 的本地化字符串。
|
||||
/// </summary>
|
||||
public string FormatError => Lang.FormatError;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔10分钟 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Interval10m => Lang.Interval10m;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔1小时 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Interval1h => Lang.Interval1h;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔1分钟 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Interval1m => Lang.Interval1m;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔2小时 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Interval2h => Lang.Interval2h;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔30分钟 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Interval30m => Lang.Interval30m;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔30秒 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Interval30s => Lang.Interval30s;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔5分钟 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Interval5m => Lang.Interval5m;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 不能为空 的本地化字符串。
|
||||
/// </summary>
|
||||
public string IsNecessary => Lang.IsNecessary;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 下一页 的本地化字符串。
|
||||
/// </summary>
|
||||
public string NextPage => Lang.NextPage;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 否 的本地化字符串。
|
||||
/// </summary>
|
||||
public string No => Lang.No;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 不在范围内 的本地化字符串。
|
||||
/// </summary>
|
||||
public string OutOfRange => Lang.OutOfRange;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 页面模式 的本地化字符串。
|
||||
/// </summary>
|
||||
public string PageMode => Lang.PageMode;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 下午 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Pm => Lang.Pm;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 PNG图片 的本地化字符串。
|
||||
/// </summary>
|
||||
public string PngImg => Lang.PngImg;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 上一页 的本地化字符串。
|
||||
/// </summary>
|
||||
public string PreviousPage => Lang.PreviousPage;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 滚动模式 的本地化字符串。
|
||||
/// </summary>
|
||||
public string ScrollMode => Lang.ScrollMode;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 提示 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Tip => Lang.Tip;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 过大 的本地化字符串。
|
||||
/// </summary>
|
||||
public string TooLarge => Lang.TooLarge;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 双页模式 的本地化字符串。
|
||||
/// </summary>
|
||||
public string TwoPageMode => Lang.TwoPageMode;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 未知 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Unknown => Lang.Unknown;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 未知大小 的本地化字符串。
|
||||
/// </summary>
|
||||
public string UnknownSize => Lang.UnknownSize;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 是 的本地化字符串。
|
||||
/// </summary>
|
||||
public string Yes => Lang.Yes;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 放大 的本地化字符串。
|
||||
/// </summary>
|
||||
public string ZoomIn => Lang.ZoomIn;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 缩小 的本地化字符串。
|
||||
/// </summary>
|
||||
public string ZoomOut => Lang.ZoomOut;
|
||||
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged(string propertyName) =>
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
public class LangKeys
|
||||
{
|
||||
/// <summary>
|
||||
/// 查找类似 上午 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Am = nameof(Am);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 取消 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Cancel = nameof(Cancel);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 无法自注册复合命令 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string CannotRegisterCompositeCommandInItself = nameof(CannotRegisterCompositeCommandInItself);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 不能注册同一命令两次 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string CannotRegisterSameCommandTwice = nameof(CannotRegisterSameCommandTwice);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 清空 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Clear = nameof(Clear);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 关闭 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Close = nameof(Close);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 关闭所有 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string CloseAll = nameof(CloseAll);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 关闭其他 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string CloseOther = nameof(CloseOther);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 确定 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Confirm = nameof(Confirm);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 错误的图片路径 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ErrorImgPath = nameof(ErrorImgPath);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 非法的图片尺寸 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ErrorImgSize = nameof(ErrorImgSize);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 查找 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Find = nameof(Find);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 格式错误 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string FormatError = nameof(FormatError);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔10分钟 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Interval10m = nameof(Interval10m);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔1小时 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Interval1h = nameof(Interval1h);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔1分钟 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Interval1m = nameof(Interval1m);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔2小时 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Interval2h = nameof(Interval2h);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔30分钟 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Interval30m = nameof(Interval30m);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔30秒 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Interval30s = nameof(Interval30s);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 间隔5分钟 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Interval5m = nameof(Interval5m);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 不能为空 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string IsNecessary = nameof(IsNecessary);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 下一页 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string NextPage = nameof(NextPage);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 否 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string No = nameof(No);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 不在范围内 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string OutOfRange = nameof(OutOfRange);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 页面模式 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string PageMode = nameof(PageMode);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 下午 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Pm = nameof(Pm);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 PNG图片 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string PngImg = nameof(PngImg);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 上一页 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string PreviousPage = nameof(PreviousPage);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 滚动模式 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ScrollMode = nameof(ScrollMode);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 提示 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Tip = nameof(Tip);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 过大 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TooLarge = nameof(TooLarge);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 双页模式 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TwoPageMode = nameof(TwoPageMode);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 未知 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Unknown = nameof(Unknown);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 未知大小 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string UnknownSize = nameof(UnknownSize);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 是 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Yes = nameof(Yes);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 放大 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ZoomIn = nameof(ZoomIn);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 缩小 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ZoomOut = nameof(ZoomOut);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ assembly name="System.Core" #>
|
||||
<#@ import namespace="System.Linq" #>
|
||||
<#@ import namespace="System.Collections.Generic"#>
|
||||
<#@ assembly name="$(TargetPath)" #>
|
||||
<#@ import namespace="HandyControl.Properties.Langs" #>
|
||||
<#@ output extension=".cs" #>
|
||||
<#
|
||||
var resourceType = typeof(Lang);
|
||||
var propertyNameList = resourceType.GetProperties().Where(item => item.PropertyType == typeof(string)).Select(item => item.Name);
|
||||
var langDic = new Dictionary<string, string>();
|
||||
foreach(var item in propertyNameList)
|
||||
{
|
||||
langDic[item] =
|
||||
@$"/// <summary>
|
||||
/// 查找类似 {Lang.ResourceManager.GetString(item, Lang.Culture)} 的本地化字符串。
|
||||
/// </summary>";
|
||||
}
|
||||
#>
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using HandyControl.Tools;
|
||||
|
||||
namespace HandyControl.Properties.Langs
|
||||
{
|
||||
public class LangDecorator : INotifyPropertyChanged
|
||||
{
|
||||
internal static LangDecorator Instance => ResourceHelper.GetResource<LangDecorator>("Langs");
|
||||
|
||||
private static string CultureInfoStr;
|
||||
|
||||
public static CultureInfo Culture
|
||||
{
|
||||
get => Lang.Culture;
|
||||
set
|
||||
{
|
||||
if (value == null) return;
|
||||
if (Equals(CultureInfoStr, value.EnglishName)) return;
|
||||
Lang.Culture = value;
|
||||
CultureInfoStr = value.EnglishName;
|
||||
|
||||
Instance.UpdateLangs();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateLangs()
|
||||
{
|
||||
<#foreach(var item in propertyNameList){#>
|
||||
OnPropertyChanged(nameof(<#=item#>));
|
||||
<#}#>
|
||||
}
|
||||
|
||||
<#foreach(var item in propertyNameList){#>
|
||||
<#=langDic[item]#>
|
||||
public string <#=item#> => Lang.<#=item#>;
|
||||
|
||||
<#}#>
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged(string propertyName) =>
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
public class LangKeys
|
||||
{
|
||||
<#foreach(var item in propertyNameList){#>
|
||||
<#=langDic[item]#>
|
||||
public static string <#=item#> = nameof(<#=item#>);
|
||||
|
||||
<#}#>
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControl.Properties.Langs">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary>
|
||||
<langs:LangDecorator x:Key="Langs"/>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary Source="Basic/Basic.xaml"/>
|
||||
<ResourceDictionary Source="Styles/Style.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using HandyControl.Properties.Langs;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace HandyControl.Tools.Extension
|
||||
{
|
||||
public class LangExtension : MarkupExtension
|
||||
{
|
||||
public LangExtension()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public LangExtension(string key) => Key = key;
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
if (!(serviceProvider.GetService(typeof(IProvideValueTarget)) is IProvideValueTarget pvt))
|
||||
return null;
|
||||
|
||||
if (!(pvt.TargetObject is DependencyObject targetObject))
|
||||
return null;
|
||||
|
||||
if (!(pvt.TargetProperty is DependencyProperty targetProperty))
|
||||
return null;
|
||||
|
||||
var binding = new Binding(Key)
|
||||
{
|
||||
Source = LangSource,
|
||||
Mode = BindingMode.OneWay
|
||||
};
|
||||
BindingOperations.SetBinding(targetObject, targetProperty, binding);
|
||||
return binding.ProvideValue(serviceProvider);
|
||||
}
|
||||
|
||||
public string Key { get; set; }
|
||||
|
||||
public virtual object LangSource => LangDecorator.Instance;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user