WPF-Control/WPF控件-12-多文本/MainWindow.xaml

32 lines
1.3 KiB
XML

<Window x:Class="WPF控件_12_多文本.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Icon="public/003540AH4M72.jpg"
mc:Ignorable="d"
Title="WPF控件_12_多文本" Height="450" Width="800">
<ScrollViewer>
<StackPanel>
<Label>
RichTextBox
</Label>
<RichTextBox MinHeight="150" AutoWordSelection="True" />
<Label>
TextBox
</Label>
<TextBox Name="TextBox" MaxLength="199" TextWrapping="Wrap" MaxLines="2" MinHeight="150"
AcceptsReturn="True" AcceptsTab="True" AutoWordSelection="True"
MouseDoubleClick="TextBox_OnMouseDoubleClick" SelectionChanged="TextBox_OnSelectionChanged">
AcceptsReturn="True" (通常情况按下回车会触发默认按钮) AcceptsTab="True" (不会出现焦点现象跳转到下一个控件中)
</TextBox>
<Label>
PasswordBox
</Label>
<PasswordBox Margin="0 0 0 50" MinHeight="150" />
</StackPanel>
</ScrollViewer>
</Window>