76 lines
4.3 KiB
XML
76 lines
4.3 KiB
XML
<UserControl
|
|
d:DataContext="{d:DesignInstance Type=viewmodels:SelectViewModel}"
|
|
d:DesignHeight="600"
|
|
d:DesignWidth="930"
|
|
mc:Ignorable="d"
|
|
x:Class="AntDesignWPFDemo.Views.SelectView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:viewmodels="clr-namespace:AntDesignWPFDemo.ViewModels"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
<ScrollViewer>
|
|
<Grid Margin="16,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel>
|
|
<Label Content="Select" Style="{StaticResource Ant.H1}" />
|
|
<TextBlock Style="{StaticResource Ant.P}" Text="Select component to select value from options." />
|
|
|
|
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
|
<TextBlock Style="{StaticResource Ant.P}" Text="A dropdown menu for displaying choices - an elegant alternative to the native select element.
Utilizing Radio is recommended when there are fewer total options (less than 5)." />
|
|
|
|
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
|
</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 IsEnabled="False" antd:Input.Placeholder="Basic usage">
|
|
<ComboBoxItem>Jack</ComboBoxItem>
|
|
<ComboBoxItem IsSelected="True">Luck</ComboBoxItem>
|
|
<ComboBoxItem IsEnabled="False">Disabled</ComboBoxItem>
|
|
<ComboBoxItem>yiminghe</ComboBoxItem>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
</antd:CodeBox.Content>
|
|
<antd:CodeBox.Code>
|
|
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n
|
|
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/AntIcons.xaml" />\n\n
|
|
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
|
<WrapPanel>\n
|
|
\t<antd:Tag>Tag 1</antd:Tag>\n
|
|
\t<antd:Tag>Link</antd:Tag>\n
|
|
\t<antd:Tag Closable="True">Tag 2</antd:Tag>\n
|
|
\t<antd:Tag Closable="True" cal:Message.Attached="[Event Closing] = [Action Closing($source, $eventArgs)]">Prevent Default</antd:Tag>\n
|
|
</WrapPanel>
|
|
</antd:CodeBox.Code>
|
|
</antd:CodeBox>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Margin="8,0" />
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</UserControl> |