mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-27 03:33:24 +08:00
Merge pull request #509 from irihitech/textbox
Add default PasswordChar `•` to Textbox
This commit is contained in:
@@ -4,80 +4,56 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:system="clr-namespace:System;assembly=netstandard"
|
|
||||||
d:DesignHeight="800"
|
d:DesignHeight="800"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<TextBox Width="300" />
|
<TextBox Width="300" />
|
||||||
<TextBox Width="300" Classes="Large" />
|
<TextBox Width="300" InnerLeftContent="https://" InnerRightContent=".com" />
|
||||||
<TextBox Width="300" Classes="Small" />
|
<TextBox Width="300" Classes="clearButton" Text="click to clear" />
|
||||||
<TextBox Width="300" Watermark="Please use this" />
|
<TextBox Width="300" Classes="revealPasswordButton" Text="123456" />
|
||||||
<TextBox Width="300" InnerLeftContent="http://" />
|
|
||||||
<TextBox Width="300" InnerRightContent=".com" />
|
|
||||||
<TextBox
|
|
||||||
Width="500"
|
|
||||||
InnerLeftContent="http://"
|
|
||||||
InnerRightContent=".com" />
|
|
||||||
<TextBox Width="300" Classes="clearButton" />
|
|
||||||
<TextBox Width="300" PasswordChar="*" />
|
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="300"
|
Width="300"
|
||||||
Classes="ClearButton RevealPasswordButton"
|
Classes="ClearButton RevealPasswordButton"
|
||||||
PasswordChar="*"
|
InnerLeftContent="https://"
|
||||||
|
InnerRightContent=".com"
|
||||||
Text="123456" />
|
Text="123456" />
|
||||||
<TextBox
|
|
||||||
Width="500"
|
|
||||||
InnerLeftContent="http://"
|
|
||||||
InnerRightContent=".com"
|
|
||||||
IsEnabled="False" />
|
|
||||||
<TextBox
|
|
||||||
Width="500"
|
|
||||||
Classes="Bordered"
|
|
||||||
InnerLeftContent="http://"
|
|
||||||
InnerRightContent=".com" />
|
|
||||||
<TextBox
|
|
||||||
Width="500"
|
|
||||||
Classes="Bordered"
|
|
||||||
InnerLeftContent="http://"
|
|
||||||
InnerRightContent=".com"
|
|
||||||
IsEnabled="False" />
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="150"
|
Width="100"
|
||||||
Classes="Large"
|
Classes="Large"
|
||||||
Watermark="Large" />
|
Watermark="Large" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="150"
|
Width="100"
|
||||||
Watermark="Default" />
|
Watermark="Default" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="150"
|
Width="100"
|
||||||
Classes="Small"
|
Classes="Small"
|
||||||
Watermark="Small" />
|
Watermark="Small" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="150"
|
Width="100"
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
Watermark="Disabled" />
|
Watermark="Disabled" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="150"
|
Width="100"
|
||||||
Classes="Bordered"
|
Classes="Bordered"
|
||||||
Watermark="Bordered" />
|
Watermark="Bordered" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="150"
|
Width="100"
|
||||||
Classes="Bordered"
|
Classes="Bordered"
|
||||||
IsEnabled="False" />
|
IsEnabled="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBox Width="300" Classes="TextArea" />
|
<TextBox Width="300" Classes="TextArea" Watermark="TextArea TextBox" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="300"
|
Width="300"
|
||||||
Theme="{StaticResource LooklessTextBox}"
|
Theme="{StaticResource LooklessTextBox}"
|
||||||
Watermark="Lookless TextBox"
|
Watermark="Lookless TextBox"
|
||||||
InnerLeftContent="http://"
|
InnerLeftContent="https://"
|
||||||
InnerRightContent=".com" />
|
InnerRightContent=".com" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -172,6 +172,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
||||||
|
<Setter Property="PasswordChar" Value="•"/>
|
||||||
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
||||||
<Setter Property="IsVisible" Value="True" />
|
<Setter Property="IsVisible" Value="True" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -379,6 +380,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
||||||
|
<Setter Property="PasswordChar" Value="•"/>
|
||||||
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
||||||
<Setter Property="IsVisible" Value="True" />
|
<Setter Property="IsVisible" Value="True" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
Reference in New Issue
Block a user