This commit is contained in:
ShrlAlgo
2025-07-11 09:20:23 +08:00
parent c7b104f44f
commit 4d35cadb56
840 changed files with 102347 additions and 11595 deletions

View File

@@ -0,0 +1,77 @@
<UserControl x:Class="AntdWpfDemo.Views.SelectView"
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"
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"
mc:Ignorable="d"
d:DesignHeight="600"
d:DesignWidth="930">
<ScrollViewer>
<Grid Margin="16 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel>
<Label Style="{StaticResource Ant.H1}" Content="Select" />
<TextBlock Style="{StaticResource Ant.P}" Text="Select component to select value from options." />
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
<TextBlock Style="{StaticResource Ant.P}" Text="A dropdown menu for displaying choices - an elegant alternative to the native select element.&#x0a;Utilizing Radio is recommended when there are fewer total options (less than 5)." />
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
</StackPanel>
<Grid Grid.Row="1">
<Grid.Resources>
<Style BasedOn="{StaticResource Ant.ComboBox}" TargetType="ComboBox">
<Setter Property="Margin" Value="0 0 8 10" />
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Margin="8 0">
<antd:CodeBox Title="Basic usage">
<antd:CodeBox.Description>
Basic usage example.
</antd:CodeBox.Description>
<antd:CodeBox.Content>
<StackPanel>
<ComboBox antd:Input.Placeholder="Basic usage">
<ComboBoxItem>Jack</ComboBoxItem>
<ComboBoxItem>Luck</ComboBoxItem>
<ComboBoxItem IsEnabled="False">Disabled</ComboBoxItem>
<ComboBoxItem>yiminghe</ComboBoxItem>
</ComboBox>
<ComboBox antd:Input.Placeholder="Basic usage" IsEnabled="False">
<ComboBoxItem>Jack</ComboBoxItem>
<ComboBoxItem IsSelected="True">Luck</ComboBoxItem>
<ComboBoxItem IsEnabled="False">Disabled</ComboBoxItem>
<ComboBoxItem>yiminghe</ComboBoxItem>
</ComboBox>
</StackPanel>
</antd:CodeBox.Content>
<antd:CodeBox.Code>
&lt;ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" /&gt;\n
&lt;ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" /&gt;\n\n
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
&lt;WrapPanel&gt;\n
\t&lt;antd:Tag&gt;Tag 1&lt;/antd:Tag&gt;\n
\t&lt;antd:Tag&gt;Link&lt;/antd:Tag&gt;\n
\t&lt;antd:Tag Closable="True"&gt;Tag 2&lt;/antd:Tag&gt;\n
\t&lt;antd:Tag Closable="True" cal:Message.Attach="[Event Closing] = [Action Closing($source, $eventArgs)]"&gt;Prevent Default&lt;/antd:Tag&gt;\n
&lt;/WrapPanel&gt;
</antd:CodeBox.Code>
</antd:CodeBox>
</StackPanel>
<StackPanel Grid.Column="1" Margin="8 0">
</StackPanel>
</Grid>
</Grid>
</ScrollViewer>
</UserControl>