整理控件库

This commit is contained in:
GG Z
2025-05-05 17:04:06 +08:00
parent 74532b77be
commit 3eaad7566e
283 changed files with 2156 additions and 17846 deletions

View File

@@ -6,85 +6,98 @@
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"
xmlns:pages="clr-namespace:WPFluent.Gallery.ViewModels.Pages"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
mc:Ignorable="d"
controls:PageControlDocumentation.Show="False"
d:DataContext="{d:DesignInstance Type=pages:TextViewModel}"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Title="TextPage"
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}">
Title="TextPage">
<ui:StackPanel Spacing="5">
<GroupBox Header="A simple TextBlock.">
<TextBlock Text="I am a text block." />
<GroupBox Header="TextBlock.">
<TextBlock Text="我是一个文本块。" />
</GroupBox>
<GroupBox Header="A TextBlock with style applied.">
<GroupBox Header="应用了样式的 TextBlock">
<TextBlock
FontFamily="Comic Sans MS"
FontStyle="Italic"
Text="I am a styled TextBlock." />
Text="我是有样式的TextBlock." />
</GroupBox>
<GroupBox Header="A TextBlock with inline text elements.">
<GroupBox Header="包含内嵌文本元素的TextBlock。">
<TextBlock FontSize="14">
<Run
FontFamily="Times New Roman"
Foreground="DarkGray"
Text="Text in a TextBlock doesn't have to be a simple string." />
Text="TextBlock 中的文本不一定是简单的字符串。" />
<LineBreak />
<Span>
<Run Text="Text can be" />
<Run Text="文本可以是" />
<Run Text=" " />
<Bold>
<Run Text="bold" />
<Run Text="粗体" />
</Bold>
<Run Text=" " />
<Run Text=" ," />
<Run Text=" " />
<Italic>
<Run Text="italic" />
<Run Text="斜体" />
</Italic>
<Run Text=" " />
<Run Text=" , or" />
<Run Text=" , " />
<Run Text=" " />
<Underline>
<Run Text="underlined" />
<Run Text="下划线" />
</Underline>
<Run Text=" " />
<Run Text=" ." />
</Span>
</TextBlock>
</GroupBox>
<GroupBox Header="A simple TextBox.">
<GroupBox Header="TextBox.">
<TextBox />
</GroupBox>
<GroupBox Header="A WPF UI TextBox.">
<ui:TextBox PlaceholderText="Type something..." />
<GroupBox Header="UI TextBox">
<ui:TextBox PlaceholderText="键入一些..." />
</GroupBox>
<GroupBox Header="TextBoxEx">
<StackPanel>
<ui:TextBoxEx
Header="Sample:"
HeaderPlacement="Left"
PlaceholderText="文本框"
Prefix="前缀:"
Suffix="后缀"
Text="{Binding Number, UpdateSourceTrigger=PropertyChanged}" />
<GroupBox Header="A multi-line TextBox.">
</StackPanel>
</GroupBox>
<GroupBox Header="TextBox(多行)">
<ui:TextBox
MinHeight="100"
PlaceholderText="Type something..."
PlaceholderText="键入一些..."
TextWrapping="Wrap" />
</GroupBox>
<GroupBox Header="A simple RichTextBox">
<GroupBox Header="ChooseBox">
<ui:ChooseBox VerticalAlignment="Center" ChooseType="Folder" />
</GroupBox>
<GroupBox Header="RichTextBox">
<RichTextBox />
</GroupBox>
<GroupBox Header="A simple PasswordBox.">
<GroupBox Header="PasswordBox">
<PasswordBox />
</GroupBox>
<GroupBox Header="WPF UI PasswordBox.">
<GroupBox Header="WPF UI PasswordBox">
<ui:PasswordBox
Icon="{ui:SymbolIcon Password24}"
PlaceholderEnabled="True"
PlaceholderText="Password..." />
PlaceholderText="请输入密码..." />
</GroupBox>
<GroupBox Header="WPF UI NumberBox.">
<ui:NumberBox PlaceholderText="Enter your age" />
<ui:NumberBox PlaceholderText="输入你的年龄" />
</GroupBox>
<GroupBox Header="WPF UI NumberBox with icon.">
@@ -99,7 +112,7 @@
SpinButtonPlacementMode="Hidden" />
</GroupBox>
<GroupBox Header="WPF UI NumberBox without decimal places.">
<GroupBox Header="WPF UI NumberBox(没有小数位的)">
<ui:NumberBox
Value="12"
Icon="{ui:SymbolIcon NumberSymbolSquare24}"
@@ -109,30 +122,8 @@
PlaceholderText="Enter your age"
SmallChange="1" />
</GroupBox>
<GroupBox Header="A simple Label.">
<Label Content="I am a Label." />
<GroupBox Header="Label.">
<Label Content="我是一个标签。" />
</GroupBox>
<GroupBox Header="A Label for TextBox.">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="I am a Label of the TextBox below." />
<!-- Target="{Binding ElementName=TextBoxForLabel}" -->
<TextBox Grid.Row="1" />
</Grid>
</GroupBox>
<GroupBox Header="WPF UI AutoSuggestBox.">
<ui:AutoSuggestBox
Icon="{ui:SymbolIcon Search24}"
OriginalItemsSource="{Binding ViewModel.AutoSuggestBoxSuggestions, Mode=OneWay}"
PlaceholderText="Search..." />
</GroupBox>
<!--<controls:GalleryNavigationPresenter
Grid.Row="1"
Margin="0, 10"
ItemsSource="{Binding ViewModel.NavigationCards, Mode=OneWay}" />-->
</ui:StackPanel>
</Page>