update to v1.3.1
This commit is contained in:
1 parent
ec2f13f0a0
commit
6c8a679c3e
65 files changed
+2108
-226
No files matched your search
@@ -26,6 +26,8 @@
|
||||
|
||||
public static readonly string TimePickerDemoCtl = nameof(TimePickerDemoCtl);
|
||||
|
||||
public static readonly string CirclePanelDemoCtl = nameof(CirclePanelDemoCtl);
|
||||
|
||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||
|
||||
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
|
||||
@@ -40,6 +42,14 @@
|
||||
|
||||
public static readonly string DatePickerDemoCtl = nameof(DatePickerDemoCtl);
|
||||
|
||||
public static readonly string TextBoxDemoCtl = nameof(TextBoxDemoCtl);
|
||||
|
||||
public static readonly string TextBlockDemoCtl = nameof(TextBlockDemoCtl);
|
||||
|
||||
public static readonly string ComboBoxDemoCtl = nameof(ComboBoxDemoCtl);
|
||||
|
||||
public static readonly string PasswordBoxDemoCtl = nameof(PasswordBoxDemoCtl);
|
||||
|
||||
public static readonly string LoadShowContent = nameof(LoadShowContent);
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,8 @@ var controlList = new List<string>
|
||||
"AnimationPathDemoCtl",
|
||||
"StepBarDemoCtl",
|
||||
"ClockDemoCtl",
|
||||
"TimePickerDemoCtl"
|
||||
"TimePickerDemoCtl",
|
||||
"CirclePanelDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
@@ -25,7 +26,11 @@ var styleList = new List<string>
|
||||
"ProgressBarDemoCtl",
|
||||
"TabControlDemoCtl",
|
||||
"CalendarDemoCtl",
|
||||
"DatePickerDemoCtl"
|
||||
"DatePickerDemoCtl",
|
||||
"TextBoxDemoCtl",
|
||||
"TextBlockDemoCtl",
|
||||
"ComboBoxDemoCtl",
|
||||
"PasswordBoxDemoCtl"
|
||||
};
|
||||
#>
|
||||
namespace HandyControlDemo.Data
|
||||
|
||||
@@ -78,12 +78,16 @@
|
||||
<DependentUpon>Lang.en.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Tools\AssemblyHelper.cs" />
|
||||
<Compile Include="Tools\Converter\StringRepeatConverter.cs" />
|
||||
<Compile Include="UserControl\Controls\AnimationPathDemoCtl.xaml.cs">
|
||||
<DependentUpon>AnimationPathDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\CarouselDemoCtl.xaml.cs">
|
||||
<DependentUpon>CarouselDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\CirclePanelDemoCtl.xaml.cs">
|
||||
<DependentUpon>CirclePanelDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\ClockDemoCtl.xaml.cs">
|
||||
<DependentUpon>ClockDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -117,6 +121,9 @@
|
||||
<Compile Include="UserControl\Styles\CalendarDemoCtl.xaml.cs">
|
||||
<DependentUpon>CalendarDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Styles\ComboBoxDemoCtl.xaml.cs">
|
||||
<DependentUpon>ComboBoxDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Styles\DatePickerDemoCtl.xaml.cs">
|
||||
<DependentUpon>DatePickerDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -135,15 +142,25 @@
|
||||
<Compile Include="UserControl\Controls\TimeBarDemoCtl.xaml.cs">
|
||||
<DependentUpon>TimeBarDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Styles\PasswordBoxDemoCtl.xaml.cs">
|
||||
<DependentUpon>PasswordBoxDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Styles\ProgressBarDemoCtl.xaml.cs">
|
||||
<DependentUpon>ProgressBarDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\TabControlDemoCtl.xaml.cs">
|
||||
<DependentUpon>TabControlDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Styles\TextBlockDemoCtl.xaml.cs">
|
||||
<DependentUpon>TextBlockDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Styles\TextBoxDemoCtl.xaml.cs">
|
||||
<DependentUpon>TextBoxDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Styles\ToggleButtonDemoCtl.xaml.cs">
|
||||
<DependentUpon>ToggleButtonDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModel\ComboBoxDemoViewModel.cs" />
|
||||
<Compile Include="ViewModel\GrowlDemoViewModel.cs" />
|
||||
<Compile Include="ViewModel\ImageBrowserDemoViewModel.cs" />
|
||||
<Compile Include="ViewModel\MainViewModel.cs" />
|
||||
@@ -168,10 +185,18 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Resources\Themes\Basic\Converters.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Resources\Themes\Basic\Geometries.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Resources\Themes\Styles\Button.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Resources\Themes\Styles\Label.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -192,6 +217,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Controls\CirclePanelDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Controls\ClockDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -236,6 +265,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Styles\ComboBoxDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Styles\DatePickerDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -260,6 +293,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Styles\PasswordBoxDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Styles\ProgressBarDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -268,6 +305,14 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Styles\TextBlockDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Styles\TextBoxDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Styles\ToggleButtonDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -12,5 +12,5 @@ using System.Windows;
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||
[assembly: AssemblyVersion("1.3.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
||||
[assembly: AssemblyVersion("1.3.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.3.1.0")]
|
||||
+99
@@ -123,6 +123,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 圆形布局 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string CirclePanel {
|
||||
get {
|
||||
return ResourceManager.GetString("CirclePanel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 时钟 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -141,6 +150,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 组合框 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ComboBox {
|
||||
get {
|
||||
return ResourceManager.GetString("ComboBox", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 对比滑块 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -159,6 +177,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 这是内容 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ContentDemoStr {
|
||||
get {
|
||||
return ResourceManager.GetString("ContentDemoStr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 控件 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -321,6 +348,24 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 密码框 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string PasswordBox {
|
||||
get {
|
||||
return ResourceManager.GetString("PasswordBox", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 请输入内容 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string PlsEnterContent {
|
||||
get {
|
||||
return ResourceManager.GetString("PlsEnterContent", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 上一步 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -375,6 +420,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 子标题 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SubTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("SubTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 成功 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -393,6 +447,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 正文 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Text {
|
||||
get {
|
||||
return ResourceManager.GetString("Text", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 文本块 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -402,6 +465,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 文本框 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TextBox {
|
||||
get {
|
||||
return ResourceManager.GetString("TextBox", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 时间条 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -429,6 +501,33 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 这是标题 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TitleDemoStr1 {
|
||||
get {
|
||||
return ResourceManager.GetString("TitleDemoStr1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 此项必填 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TitleDemoStr2 {
|
||||
get {
|
||||
return ResourceManager.GetString("TitleDemoStr2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 标题在左侧 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TitleDemoStr3 {
|
||||
get {
|
||||
return ResourceManager.GetString("TitleDemoStr3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 切换按钮 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -249,4 +249,37 @@
|
||||
<data name="TimePicker" xml:space="preserve">
|
||||
<value>TimePicker</value>
|
||||
</data>
|
||||
<data name="TextBox" xml:space="preserve">
|
||||
<value>TextBox</value>
|
||||
</data>
|
||||
<data name="ContentDemoStr" xml:space="preserve">
|
||||
<value>This is the content</value>
|
||||
</data>
|
||||
<data name="TitleDemoStr1" xml:space="preserve">
|
||||
<value>This is the title</value>
|
||||
</data>
|
||||
<data name="TitleDemoStr2" xml:space="preserve">
|
||||
<value>This item must be filled in</value>
|
||||
</data>
|
||||
<data name="PlsEnterContent" xml:space="preserve">
|
||||
<value>Please enter content</value>
|
||||
</data>
|
||||
<data name="TitleDemoStr3" xml:space="preserve">
|
||||
<value>The title is on the left</value>
|
||||
</data>
|
||||
<data name="Text" xml:space="preserve">
|
||||
<value>Text</value>
|
||||
</data>
|
||||
<data name="SubTitle" xml:space="preserve">
|
||||
<value>Subtitle</value>
|
||||
</data>
|
||||
<data name="PasswordBox" xml:space="preserve">
|
||||
<value>PasswordBox</value>
|
||||
</data>
|
||||
<data name="CirclePanel" xml:space="preserve">
|
||||
<value>CirclePanel</value>
|
||||
</data>
|
||||
<data name="ComboBox" xml:space="preserve">
|
||||
<value>ComboBox</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -229,4 +229,37 @@
|
||||
<data name="TimePicker" xml:space="preserve">
|
||||
<value>时间选择器</value>
|
||||
</data>
|
||||
<data name="TextBox" xml:space="preserve">
|
||||
<value>文本框</value>
|
||||
</data>
|
||||
<data name="ContentDemoStr" xml:space="preserve">
|
||||
<value>这是内容</value>
|
||||
</data>
|
||||
<data name="TitleDemoStr1" xml:space="preserve">
|
||||
<value>这是标题</value>
|
||||
</data>
|
||||
<data name="TitleDemoStr2" xml:space="preserve">
|
||||
<value>此项必填</value>
|
||||
</data>
|
||||
<data name="PlsEnterContent" xml:space="preserve">
|
||||
<value>请输入内容</value>
|
||||
</data>
|
||||
<data name="TitleDemoStr3" xml:space="preserve">
|
||||
<value>标题在左侧</value>
|
||||
</data>
|
||||
<data name="Text" xml:space="preserve">
|
||||
<value>正文</value>
|
||||
</data>
|
||||
<data name="SubTitle" xml:space="preserve">
|
||||
<value>子标题</value>
|
||||
</data>
|
||||
<data name="PasswordBox" xml:space="preserve">
|
||||
<value>密码框</value>
|
||||
</data>
|
||||
<data name="CirclePanel" xml:space="preserve">
|
||||
<value>圆形布局</value>
|
||||
</data>
|
||||
<data name="ComboBox" xml:space="preserve">
|
||||
<value>组合框</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,7 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converter="clr-namespace:HandyControlDemo.Tools.Converter">
|
||||
|
||||
<converter:StringRepeatConverter x:Key="StringRepeatConverter"/>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -3,5 +3,7 @@
|
||||
|
||||
<Geometry x:Key="NewGeometry">M512 0h1216a512 512 0 1 1 0 1024H512A512 512 0 1 1 512 0zM420.16 311.04V768h74.88V433.92h2.56l228.48 334.08h72.96V311.04h-75.52v329.6h-2.56l-225.92-329.6h-74.88z m468.48 0V768h340.48v-64h-265.6V565.76h239.36v-64h-239.36V375.04h254.72v-64h-329.6z m369.28 0l131.2 456.96h80l89.6-343.68h2.56l88.96 343.68h79.36l131.84-456.96h-84.48l-85.76 347.52h-2.56l-90.24-347.52h-77.44l-90.24 347.52h-2.56l-85.76-347.52h-84.48z</Geometry>
|
||||
<Geometry x:Key="LogoGeometry">M40.493382,19.001303 C36.637875,19.06448 33.938568,21.421986 33.948524,25.271919 L34.068279,71.56765 34.066906,71.598007 34.068745,71.747833 34.18895,118.21758 C34.202225,123.35083 39.026951,129.19344 44.965271,131.2674 50.903587,133.34137 55.706783,130.86133 55.693504,125.72808 L55.589508,85.524513 93.866371,85.524513 93.950943,118.21758 C93.964218,123.35083 98.788948,129.19344 104.72726,131.2674 110.66558,133.34137 115.46878,130.86133 115.4555,125.72808 L115.33575,79.432381 115.33712,79.401993 115.33528,79.252007 115.21507,32.782413 C115.2018,27.64917 110.37708,21.806566 104.43876,19.732603 98.500435,17.658638 93.697243,20.138674 93.710518,25.271919 L93.814514,65.475487 55.537647,65.475487 55.453079,32.782413 C55.439804,27.64917 50.615082,21.806566 44.676762,19.732603 43.192181,19.214111 41.778549,18.980244 40.493382,19.001303 z M9.999999,0 L140,0 C145.52284,0 150,4.4771523 150,9.999999 L150,140 C150,145.52284 145.52284,150 140,150 L9.999999,150 C4.4771523,150 0,145.52284 0,140 L0,9.999999 C0,4.4771523 4.4771523,0 9.999999,0 z</Geometry>
|
||||
<Geometry x:Key="CirclePanelDemoGeometry">M28.677037,-2.2499313E-22 C38.75065,24.740243 38.50705,52.437974 27.999852,77.000001 L-1.7053028E-13,65.206651 C7.3550318,48.013234 7.5255431,28.624822 0.4740567,11.306663 z</Geometry>
|
||||
<Geometry x:Key="CirclePanelRightGeometry">M267.287478 892.162257c0 45.149912 59.597884 71.336861 93.008818 37.925926L740.458554 549.925926c21.671958-21.671958 21.671958-54.179894 0-75.851852L360.296296 93.911817c-33.410935-33.410935-93.008818-5.417989-93.008818 38.828924v759.421516z m0 0</Geometry>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,35 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="CirclePanelButton" BasedOn="{StaticResource ButtonCustom}" TargetType="Button">
|
||||
<Setter Property="UseLayoutRounding" Value="False"/>
|
||||
<Setter Property="Height" Value="77"/>
|
||||
<Setter Property="Width" Value="36.06"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid>
|
||||
<Path Data="{StaticResource CirclePanelDemoGeometry}" Fill="{DynamicResource PrimaryBrush}" Height="77" Width="36.06"/>
|
||||
<Path Data="{StaticResource CirclePanelRightGeometry}" Stretch="Uniform" Margin="12" Fill="White"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Opacity" Value=".9"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Opacity" Value=".6"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.4"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -3,8 +3,10 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../Basic/Brushes.xaml"/>
|
||||
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
|
||||
<ResourceDictionary Source="../Basic/Converters.xaml"/>
|
||||
<ResourceDictionary Source="TreeViewItem.xaml"/>
|
||||
<ResourceDictionary Source="Label.xaml"/>
|
||||
<ResourceDictionary Source="Button.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace HandyControlDemo.Tools.Converter
|
||||
{
|
||||
public class StringRepeatConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is string strValue)
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
int num;
|
||||
if (parameter is string numStr)
|
||||
{
|
||||
if (!int.TryParse(numStr, out num))
|
||||
{
|
||||
return strValue;
|
||||
}
|
||||
}
|
||||
else if(parameter is int intValue)
|
||||
{
|
||||
num = intValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return strValue;
|
||||
}
|
||||
for (var i = 0; i < num; i++)
|
||||
{
|
||||
builder.Append(strValue);
|
||||
}
|
||||
return builder.ToString();
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.CirclePanelDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:CirclePanel Margin="64" Diameter="170">
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
</controls:CirclePanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class CirclePanelDemoCtl
|
||||
{
|
||||
public CirclePanelDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,19 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:TimePicker Margin="32"/>
|
||||
<StackPanel Margin="32">
|
||||
<controls:TimePicker/>
|
||||
<controls:TimePicker Margin="0,16,0,0" IsEnabled="False"/>
|
||||
|
||||
<controls:TimePicker Style="{StaticResource TimePickerExtend}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<controls:TimePicker controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource TimePickerExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<controls:TimePicker Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" Style="{StaticResource TimePickerExtend}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<controls:TimePicker Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource TimePickerExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -16,13 +16,18 @@
|
||||
<TreeViewItem IsExpanded="True" Header="{x:Static langs:Lang.Styles}">
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ButtonDemoCtl}" Header="{x:Static langs:Lang.Button}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ToggleButtonDemoCtl}" Header="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.TextBlockDemoCtl}" Header="{x:Static langs:Lang.TextBlock}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.TextBoxDemoCtl}" Header="{x:Static langs:Lang.TextBox}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.ComboBoxDemoCtl}" Header="{x:Static langs:Lang.ComboBox}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Header="{x:Static langs:Lang.PasswordBox}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ExpanderDemoCtl}" Header="{x:Static langs:Lang.Expander}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ProgressBarDemoCtl}" Header="{x:Static langs:Lang.ProgressBar}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.CalendarDemoCtl}" Header="{x:Static langs:Lang.Calendar}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.CalendarDemoCtl}" Header="{x:Static langs:Lang.Calendar}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Header="{x:Static langs:Lang.DatePicker}"/>
|
||||
</TreeViewItem>
|
||||
<TreeViewItem IsExpanded="True" Header="{x:Static langs:Lang.Controls}">
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.ClockDemoCtl}" Header="{x:Static langs:Lang.Clock}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Header="{x:Static langs:Lang.CirclePanel}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ClockDemoCtl}" Header="{x:Static langs:Lang.Clock}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.TimePickerDemoCtl}" Header="{x:Static langs:Lang.TimePicker}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.StepBarDemoCtl}" Header="{x:Static langs:Lang.StepBar}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.GrowlDemoCtl}" Header="{x:Static langs:Lang.Growl}"/>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// CalendarDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class CalendarDemoCtl
|
||||
{
|
||||
public CalendarDemoCtl()
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ComboBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="32">
|
||||
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0"/>
|
||||
<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" controls: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}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource ComboBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" SelectedIndex="0" controls: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" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource ComboBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<ComboBox ItemsSource="{Binding DataList}" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls: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" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls: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" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ComboBoxDemoCtl
|
||||
{
|
||||
public ComboBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,19 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<DatePicker Margin="32" SelectedDate="{x:Static system:DateTime.Now}"/>
|
||||
<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}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<DatePicker SelectedDate="{x:Static system:DateTime.Now}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource DatePickerExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<DatePicker SelectedDate="{x:Static system:DateTime.Now}" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" Style="{StaticResource DatePickerExtend}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<DatePicker Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource DatePickerExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,20 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.PasswordBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<PasswordBox Password="123456"/>
|
||||
<PasswordBox Password="123456" IsEnabled="False" Margin="0,16,0,0"/>
|
||||
|
||||
<PasswordBox controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Password="123456" Margin="0,32,0,0" Style="{StaticResource PasswordBoxExtend}"/>
|
||||
<PasswordBox controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource PasswordBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<PasswordBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource PasswordBoxExtend}" Margin="0,32,0,0" Password="123456"/>
|
||||
<PasswordBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Style="{StaticResource PasswordBoxExtend}" Margin="0,16,0,0"/>
|
||||
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class PasswordBoxDemoCtl
|
||||
{
|
||||
public PasswordBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TextBlockDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockLargeBold" Style="{DynamicResource TextBlockLargeBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockLarge" Style="{DynamicResource TextBlockLarge}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockHeaderBold" Style="{DynamicResource TextBlockTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockHeader" Style="{DynamicResource TextBlockTitle}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockSubHeaderBold" Style="{DynamicResource TextBlockSubTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockSubHeader" Style="{DynamicResource TextBlockSubTitle}"/>
|
||||
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultBold" Style="{DynamicResource TextBlockDefaultBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefault" Style="{DynamicResource TextBlockDefault}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultAccent" Style="{DynamicResource TextBlockDefaultAccent}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultSecLight" Style="{DynamicResource TextBlockDefaultSecLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultThiLight" Style="{DynamicResource TextBlockDefaultThiLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultPrimary" Style="{DynamicResource TextBlockDefaultPrimary}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultDanger" Style="{DynamicResource TextBlockDefaultDanger}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultWarning" Style="{DynamicResource TextBlockDefaultWarning}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultInfo" Style="{DynamicResource TextBlockDefaultInfo}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultSuccess" Style="{DynamicResource 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="{DynamicResource TextBlockLargeBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{DynamicResource TextBlockLarge}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=12}" Style="{DynamicResource TextBlockTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=12}" Style="{DynamicResource TextBlockTitle}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.SubTitle},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{DynamicResource TextBlockSubTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.SubTitle},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{DynamicResource TextBlockSubTitle}"/>
|
||||
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefaultBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefault}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefaultAccent}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefaultSecLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefaultThiLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefaultPrimary}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefaultDanger}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefaultWarning}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefaultInfo}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{DynamicResource TextBlockDefaultSuccess}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// TextBlockDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class TextBlockDemoCtl
|
||||
{
|
||||
public TextBlockDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TextBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="White">
|
||||
<controls: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 controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<TextBox controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource TextBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Style="{StaticResource TextBoxExtend}" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// TextBoxDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class TextBoxDemoCtl
|
||||
{
|
||||
public TextBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using GalaSoft.MvvmLight;
|
||||
using HandyControlDemo.Tools.Converter;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class ComboBoxDemoViewModel : ViewModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据列表
|
||||
/// </summary>
|
||||
private List<string> _dataList;
|
||||
|
||||
/// <summary>
|
||||
/// 数据列表
|
||||
/// </summary>
|
||||
public List<string> DataList
|
||||
{
|
||||
get => _dataList;
|
||||
set => Set(ref _dataList, value);
|
||||
}
|
||||
|
||||
public ComboBoxDemoViewModel()
|
||||
{
|
||||
var converter = new StringRepeatConverter();
|
||||
var list = new List<string>();
|
||||
for (var i = 1; i <= 9; i++)
|
||||
{
|
||||
list.Add(converter.Convert(Properties.Langs.Lang.Text, null, i, CultureInfo.CurrentCulture)?.ToString());
|
||||
}
|
||||
|
||||
DataList = list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ namespace HandyControlDemo.ViewModel
|
||||
SimpleIoc.Default.Register<MainViewModel>();
|
||||
SimpleIoc.Default.Register<GrowlDemoViewModel>();
|
||||
SimpleIoc.Default.Register<ImageBrowserDemoViewModel>();
|
||||
SimpleIoc.Default.Register<ComboBoxDemoViewModel>();
|
||||
}
|
||||
|
||||
public static ViewModelLocator Instance => new Lazy<ViewModelLocator>(() =>
|
||||
@@ -27,6 +28,8 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
public ImageBrowserDemoViewModel ImageBrowserDemo => ServiceLocator.Current.GetInstance<ImageBrowserDemoViewModel>();
|
||||
|
||||
public ComboBoxDemoViewModel ComboBoxDemo => ServiceLocator.Current.GetInstance<ComboBoxDemoViewModel>();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user