enhance the function of passwordbox

This commit is contained in:
NaBian committed 2018-11-18 00:10:10 +08:00
1 parent aece5e3a44
commit 368fb52ed4
15 files changed
+481 -94

No files matched your search

+3 -1
View File
@@ -42,6 +42,8 @@
public static readonly string ComboBoxDemoCtl = nameof(ComboBoxDemoCtl);
public static readonly string PasswordBoxDemoCtl = nameof(PasswordBoxDemoCtl);
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
@@ -62,7 +64,7 @@
public static readonly string NaiveComboBoxDemoCtl = nameof(NaiveComboBoxDemoCtl);
public static readonly string PasswordBoxDemoCtl = nameof(PasswordBoxDemoCtl);
public static readonly string NaivePasswordBoxDemoCtl = nameof(NaivePasswordBoxDemoCtl);
public static readonly string NaiveTabControlDemoCtl = nameof(NaiveTabControlDemoCtl);
+3 -2
View File
@@ -23,7 +23,8 @@ var controlList = new List<string>
"PreviewSliderDemoCtl",
"CircleProgressBarDemoCtl",
"TextBoxDemoCtl",
"ComboBoxDemoCtl"
"ComboBoxDemoCtl",
"PasswordBoxDemoCtl"
};
var styleList = new List<string>
{
@@ -37,7 +38,7 @@ var styleList = new List<string>
"NaiveTextBoxDemoCtl",
"TextBlockDemoCtl",
"NaiveComboBoxDemoCtl",
"PasswordBoxDemoCtl",
"NaivePasswordBoxDemoCtl",
"NaiveTabControlDemoCtl",
"DataGridDemoCtl",
"CheckBoxDemoCtl",
+10 -3
View File
@@ -132,6 +132,9 @@
<Compile Include="UserControl\Controls\NumericUpDownDemoCtl.xaml.cs">
<DependentUpon>NumericUpDownDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControl\Controls\PasswordBoxDemoCtl.xaml.cs">
<DependentUpon>PasswordBoxDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControl\Controls\PreviewSliderDemoCtl.xaml.cs">
<DependentUpon>PreviewSliderDemoCtl.xaml</DependentUpon>
</Compile>
@@ -207,8 +210,8 @@
<Compile Include="UserControl\Styles\NaiveTabControlDemoCtl.xaml.cs">
<DependentUpon>NaiveTabControlDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControl\Styles\PasswordBoxDemoCtl.xaml.cs">
<DependentUpon>PasswordBoxDemoCtl.xaml</DependentUpon>
<Compile Include="UserControl\Styles\NaivePasswordBoxDemoCtl.xaml.cs">
<DependentUpon>NaivePasswordBoxDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControl\Styles\ProgressBarDemoCtl.xaml.cs">
<DependentUpon>ProgressBarDemoCtl.xaml</DependentUpon>
@@ -357,6 +360,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControl\Controls\PasswordBoxDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControl\Controls\PreviewSliderDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -457,7 +464,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControl\Styles\PasswordBoxDemoCtl.xaml">
<Page Include="UserControl\Styles\NaivePasswordBoxDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -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="{DynamicResource RegionBrush}">
<controls:TransitioningContentControl>
<StackPanel Margin="32">
<controls:PasswordBox ShowClearButton="True" Password="123456"/>
<controls:PasswordBox Password="123456" IsEnabled="False" Margin="0,16,0,0"/>
<controls:PasswordBox ShowClearButton="True" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Password="123456" Margin="0,32,0,0"/>
<controls:PasswordBox controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
<controls:PasswordBox ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Password="123456"/>
<controls: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" Margin="0,32,0,0"/>
</StackPanel>
</controls:TransitioningContentControl>
</UserControl>
@@ -1,5 +1,4 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl
{
public partial class PasswordBoxDemoCtl
{
@@ -65,7 +65,7 @@
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
<ListBoxItem Tag="{x:Static data:MessageToken.NaivePasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
</controls:EdgeElement.LeftContent>
@@ -139,6 +139,11 @@
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
@@ -1,4 +1,4 @@
<UserControl x:Class="HandyControlDemo.UserControl.PasswordBoxDemoCtl"
<UserControl x:Class="HandyControlDemo.UserControl.NaivePasswordBoxDemoCtl"
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"
@@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class NaivePasswordBoxDemoCtl
{
public NaivePasswordBoxDemoCtl()
{
InitializeComponent();
}
}
}