Files
ShrlAlgoToolkit/WPFluent.Gallery/Views/Pages/TextPage.xaml

128 lines
4.6 KiB
Plaintext
Raw Normal View History

2025-04-24 20:56:44 +08:00
<Page
x:Class="WPFluent.Gallery.Views.TextPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFluent.Gallery.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="clr-namespace:WPFluent.Gallery.Models"
2025-05-05 17:04:06 +08:00
xmlns:pages="clr-namespace:WPFluent.Gallery.ViewModels.Pages"
2025-04-24 20:56:44 +08:00
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
2025-07-11 09:20:23 +08:00
xmlns:vm="clr-namespace:WPFluent.Gallery.ViewModels.Pages"
2025-04-24 20:56:44 +08:00
mc:Ignorable="d"
2025-07-11 09:20:23 +08:00
d:DataContext="{d:DesignInstance Type=vm:TextViewModel}"
2025-04-24 20:56:44 +08:00
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
2025-05-05 17:04:06 +08:00
Title="TextPage">
2025-04-24 20:56:44 +08:00
<ui:StackPanel Spacing="5">
2025-05-05 17:04:06 +08:00
<GroupBox Header="TextBlock.">
<TextBlock Text="我是一个文本块。" />
2025-04-24 20:56:44 +08:00
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="应用了样式的 TextBlock。">
2025-04-24 20:56:44 +08:00
<TextBlock
FontFamily="Comic Sans MS"
FontStyle="Italic"
2025-05-05 17:04:06 +08:00
Text="我是有样式的TextBlock." />
2025-04-24 20:56:44 +08:00
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="包含内嵌文本元素的TextBlock。">
2025-04-24 20:56:44 +08:00
<TextBlock FontSize="14">
<Run
FontFamily="Times New Roman"
Foreground="DarkGray"
2025-05-05 17:04:06 +08:00
Text="TextBlock 中的文本不一定是简单的字符串。" />
2025-04-24 20:56:44 +08:00
<LineBreak />
<Span>
2025-05-05 17:04:06 +08:00
<Run Text="文本可以是" />
2025-04-24 20:56:44 +08:00
<Run Text=" " />
<Bold>
2025-05-05 17:04:06 +08:00
<Run Text="粗体" />
2025-04-24 20:56:44 +08:00
</Bold>
<Run Text=" " />
<Run Text=" ," />
<Run Text=" " />
<Italic>
2025-05-05 17:04:06 +08:00
<Run Text="斜体" />
2025-04-24 20:56:44 +08:00
</Italic>
<Run Text=" " />
2025-05-05 17:04:06 +08:00
<Run Text=" , 或" />
2025-04-24 20:56:44 +08:00
<Run Text=" " />
<Underline>
2025-05-05 17:04:06 +08:00
<Run Text="下划线" />
2025-04-24 20:56:44 +08:00
</Underline>
<Run Text=" " />
<Run Text=" ." />
</Span>
</TextBlock>
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="TextBox.">
2025-04-24 20:56:44 +08:00
<TextBox />
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="UI TextBox">
<ui:TextBox PlaceholderText="键入一些..." />
2025-04-24 20:56:44 +08:00
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="TextBoxEx">
<StackPanel>
<ui:TextBoxEx
Header="Sample:"
HeaderPlacement="Left"
PlaceholderText="文本框"
Prefix="前缀:"
2025-07-11 09:20:23 +08:00
Suffix="后缀" />
2025-05-05 17:04:06 +08:00
</StackPanel>
</GroupBox>
<GroupBox Header="TextBox(多行)">
2025-04-24 20:56:44 +08:00
<ui:TextBox
MinHeight="100"
2025-05-05 17:04:06 +08:00
PlaceholderText="键入一些..."
2025-04-24 20:56:44 +08:00
TextWrapping="Wrap" />
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="ChooseBox">
<ui:ChooseBox VerticalAlignment="Center" ChooseType="Folder" />
</GroupBox>
<GroupBox Header="RichTextBox">
2025-04-24 20:56:44 +08:00
<RichTextBox />
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="PasswordBox">
2025-04-24 20:56:44 +08:00
<PasswordBox />
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="WPF UI PasswordBox">
2025-04-24 20:56:44 +08:00
<ui:PasswordBox
Icon="{ui:SymbolIcon Password24}"
PlaceholderEnabled="True"
2025-05-05 17:04:06 +08:00
PlaceholderText="请输入密码..." />
2025-04-24 20:56:44 +08:00
</GroupBox>
<GroupBox Header="WPF UI NumberBox.">
2025-05-05 17:04:06 +08:00
<ui:NumberBox PlaceholderText="输入你的年龄" />
2025-04-24 20:56:44 +08:00
</GroupBox>
<GroupBox Header="WPF UI NumberBox with icon.">
<ui:NumberBox
Value="1.50"
Icon="{ui:SymbolIcon NumberSymbolSquare24}"
LargeChange="2.25"
Maximum="10"
Minimum="-10"
PlaceholderText="Enter your age"
SmallChange="0.25"
SpinButtonPlacementMode="Hidden" />
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="WPF UI NumberBox(没有小数位的)">
2025-04-24 20:56:44 +08:00
<ui:NumberBox
Value="12"
Icon="{ui:SymbolIcon NumberSymbolSquare24}"
MaxDecimalPlaces="0"
Maximum="100"
Minimum="0"
PlaceholderText="Enter your age"
SmallChange="1" />
</GroupBox>
2025-05-05 17:04:06 +08:00
<GroupBox Header="Label.">
<Label Content="我是一个标签。" />
2025-04-24 20:56:44 +08:00
</GroupBox>
</ui:StackPanel>
</Page>