feat: enhance TextBoxDemo.

This commit is contained in:
Zhang Dian
2024-12-01 19:34:39 +08:00
parent 2bded9434b
commit fe380f9b0b

View File

@@ -4,79 +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" Text="click to clear"/>
<TextBox Width="300" Classes="revealPasswordButton" PasswordChar="*" Text="123456"/>
<TextBox <TextBox
Width="300" Width="300"
Classes="ClearButton RevealPasswordButton" Classes="ClearButton RevealPasswordButton"
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>