月更
This commit is contained in:
@@ -1,49 +1,50 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.AlertView"
|
||||
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">
|
||||
<UserControl
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930"
|
||||
mc:Ignorable="d"
|
||||
x:Class="AntDesignWPFDemo.Views.AlertView"
|
||||
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:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Alert" />
|
||||
<Label Content="Alert" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Alert component for feedback." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="When you need to show alert messages to users.
When you need a persistent static container which is closable by user actions." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="antd:Alert">
|
||||
<Setter Property="Margin" Value="0 0 0 15" />
|
||||
<Setter Property="Margin" Value="0,0,0,15" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<antd:CodeBox Title="Basic" >
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
The simplest usage for short messages.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<antd:Alert Type="Success" Message="Success Text" />
|
||||
<antd:Alert Message="Success Text" Type="Success" />
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<antd:Alert Type="Success" Message="Success Text" />
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -53,10 +54,16 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<antd:Alert Type="Warning" Closable="True" VerticalContentAlignment="Top">
|
||||
<antd:Alert
|
||||
Closable="True"
|
||||
Type="Warning"
|
||||
VerticalContentAlignment="Top">
|
||||
Warning Text Warning Text Warning TextW arning Text Warning Text Warning TextWarning Text
|
||||
</antd:Alert>
|
||||
<antd:Alert Type="Error" Message="Error Text" Closable="True">
|
||||
<antd:Alert
|
||||
Closable="True"
|
||||
Message="Error Text"
|
||||
Type="Error">
|
||||
<antd:Alert.Description>
|
||||
Error Description Error Description Error Description Error Description Error Description Error Description
|
||||
</antd:Alert.Description>
|
||||
@@ -64,17 +71,17 @@
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<antd:Alert Type="Warning" Closable="True" VerticalContentAlignment="Top">\n
|
||||
\t\tWarning Text Warning Text Warning TextW arning Text Warning Text Warning TextWarning Text\n
|
||||
\t</antd:Alert>\n
|
||||
\t<antd:Alert Type="Error" Message="Error Text" Closable="True">\n
|
||||
\t\t<antd:Alert.Description>\n
|
||||
\t\tError Description Error Description Error Description Error Description Error Description Error Description\n
|
||||
\t\t</antd:Alert.Description>\n
|
||||
\t</antd:Alert>\n
|
||||
\t<antd:Alert Type="Warning" Closable="True" VerticalContentAlignment="Top">\n
|
||||
\t\tWarning Text Warning Text Warning TextW arning Text Warning Text Warning TextWarning Text\n
|
||||
\t</antd:Alert>\n
|
||||
\t<antd:Alert Type="Error" Message="Error Text" Closable="True">\n
|
||||
\t\t<antd:Alert.Description>\n
|
||||
\t\tError Description Error Description Error Description Error Description Error Description Error Description\n
|
||||
\t\t</antd:Alert.Description>\n
|
||||
\t</antd:Alert>\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -84,53 +91,77 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<antd:Alert Type="Success" Message="Success Tips" ShowIcon="True" />
|
||||
<antd:Alert
|
||||
Message="Success Tips"
|
||||
ShowIcon="True"
|
||||
Type="Success" />
|
||||
<antd:Alert Message="Informational Notes" ShowIcon="True" />
|
||||
<antd:Alert Type="Warning" Message="Warning" ShowIcon="True" />
|
||||
<antd:Alert Type="Error" Message="Error" ShowIcon="True" />
|
||||
<antd:Alert Type="Success" Message="Success Tips" Description="Detailed description and advices about successful copywriting." ShowIcon="True" />
|
||||
<antd:Alert Message="Informational Notes" Description="Additional description and informations about copywriting." ShowIcon="True" />
|
||||
<antd:Alert Type="Warning" Message="Warning" Description="This is a warning notice about copywriting." ShowIcon="True" />
|
||||
<antd:Alert Type="Error" Message="Error" Description="This is an error message about copywriting." ShowIcon="True" />
|
||||
<antd:Alert
|
||||
Message="Warning"
|
||||
ShowIcon="True"
|
||||
Type="Warning" />
|
||||
<antd:Alert
|
||||
Message="Error"
|
||||
ShowIcon="True"
|
||||
Type="Error" />
|
||||
<antd:Alert
|
||||
Description="Detailed description and advices about successful copywriting."
|
||||
Message="Success Tips"
|
||||
ShowIcon="True"
|
||||
Type="Success" />
|
||||
<antd:Alert
|
||||
Description="Additional description and informations about copywriting."
|
||||
Message="Informational Notes"
|
||||
ShowIcon="True" />
|
||||
<antd:Alert
|
||||
Description="This is a warning notice about copywriting."
|
||||
Message="Warning"
|
||||
ShowIcon="True"
|
||||
Type="Warning" />
|
||||
<antd:Alert
|
||||
Description="This is an error message about copywriting."
|
||||
Message="Error"
|
||||
ShowIcon="True"
|
||||
Type="Error" />
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<antd:Alert Type="Success" Message="Success Tips" ShowIcon="True" />\n
|
||||
\t<antd:Alert Message="Informational Notes" ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Warning" Message="Warning" ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Error" Message="Error" ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Success" Message="Success Tips" Description="Detailed description and advices about successful copywriting." ShowIcon="True" />\n
|
||||
\t<antd:Alert Message="Informational Notes" Description="Additional description and informations about copywriting." ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Warning" Message="Warning" Description="This is a warning notice about copywriting." ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Error" Message="Error" Description="This is an error message about copywriting." ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Success" Message="Success Tips" ShowIcon="True" />\n
|
||||
\t<antd:Alert Message="Informational Notes" ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Warning" Message="Warning" ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Error" Message="Error" ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Success" Message="Success Tips" Description="Detailed description and advices about successful copywriting." ShowIcon="True" />\n
|
||||
\t<antd:Alert Message="Informational Notes" Description="Additional description and informations about copywriting." ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Warning" Message="Warning" Description="This is a warning notice about copywriting." ShowIcon="True" />\n
|
||||
\t<antd:Alert Type="Error" Message="Error" Description="This is an error message about copywriting." ShowIcon="True" />\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="More types">
|
||||
<antd:CodeBox.Description>
|
||||
There are 4 types of Alert: `Success`, `Info`, `Warning`, `Error`.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<antd:Alert Type="Success" Message="Success Text" />
|
||||
<antd:Alert Message="Success Text" Type="Success" />
|
||||
<antd:Alert Message="Info Text" />
|
||||
<antd:Alert Type="Warning" Message="Warning Text" />
|
||||
<antd:Alert Type="Error" Message="Error Text" />
|
||||
<antd:Alert Message="Warning Text" Type="Warning" />
|
||||
<antd:Alert Message="Error Text" Type="Error" />
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<antd:Alert Type="Success" Message="Success Text" />\n
|
||||
\t<antd:Alert Message="Info Text" />\n
|
||||
\t<antd:Alert Type="Warning" Message="Warning Text" />\n
|
||||
\t<antd:Alert Type="Error" Message="Error Text" />\n
|
||||
\t<antd:Alert Type="Success" Message="Success Text" />\n
|
||||
\t<antd:Alert Message="Info Text" />\n
|
||||
\t<antd:Alert Type="Warning" Message="Warning Text" />\n
|
||||
\t<antd:Alert Type="Error" Message="Error Text" />\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -140,20 +171,29 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<antd:Alert Type="Success" Message="Success Text" Description="Success Description Success Description Success Description" />
|
||||
<antd:Alert Message="Info Text" Description="Info Description Info Description Info Description Info Description" />
|
||||
<antd:Alert Type="Warning" Message="Warning Text" Description="Warning Description Warning Description Warning Description Warning Description" />
|
||||
<antd:Alert Type="Error" Message="Error Text" Description="Error Description Error Description Error Description Error Description" />
|
||||
<antd:Alert
|
||||
Description="Success Description Success Description Success Description"
|
||||
Message="Success Text"
|
||||
Type="Success" />
|
||||
<antd:Alert Description="Info Description Info Description Info Description Info Description" Message="Info Text" />
|
||||
<antd:Alert
|
||||
Description="Warning Description Warning Description Warning Description Warning Description"
|
||||
Message="Warning Text"
|
||||
Type="Warning" />
|
||||
<antd:Alert
|
||||
Description="Error Description Error Description Error Description Error Description"
|
||||
Message="Error Text"
|
||||
Type="Error" />
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<antd:Alert Type="Success" Message="Success Text" Margin="0 0 0 16" />\n
|
||||
\t<antd:Alert Message="Info Text" Margin="0 0 0 16" />\n
|
||||
\t<antd:Alert Type="Warning" Message="Warning Text" Margin="0 0 0 16" />\n
|
||||
\t<antd:Alert Type="Error" Message="Error Text" />\n
|
||||
\t<antd:Alert Type="Success" Message="Success Text" Margin="0 0 0 16" />\n
|
||||
\t<antd:Alert Message="Info Text" Margin="0 0 0 16" />\n
|
||||
\t<antd:Alert Type="Warning" Message="Warning Text" Margin="0 0 0 16" />\n
|
||||
\t<antd:Alert Type="Error" Message="Error Text" />\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -163,14 +203,14 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<antd:Alert Message="Info Text" CloseText="Close Now" />
|
||||
<antd:Alert CloseText="Close Now" Message="Info Text" />
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<antd:Alert Message="Info Text" CloseText="Close Now" />\n
|
||||
\t<antd:Alert Message="Info Text" CloseText="Close Now" />\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -180,16 +220,16 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<antd:Alert Message="Alert Message Text" Closable="True" />
|
||||
<antd:Alert Closable="True" Message="Alert Message Text" />
|
||||
<TextBlock Text="placeholder text here" />
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<antd:Alert Message="Alert Message Text" Closable="True" />\n
|
||||
\t<TextBlock Text="placeholder text here" />\n
|
||||
\t<antd:Alert Message="Alert Message Text" Closable="True" />\n
|
||||
\t<TextBlock Text="placeholder text here" />\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AntdWpfDemo.Views
|
||||
namespace AntDesignWPFDemo.Views
|
||||
{
|
||||
public partial class AlertView
|
||||
{
|
||||
|
||||
@@ -1,37 +1,38 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.AvatarView"
|
||||
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">
|
||||
<UserControl
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930"
|
||||
mc:Ignorable="d"
|
||||
x:Class="AntDesignWPFDemo.Views.AvatarView"
|
||||
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:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Avatar" />
|
||||
<Label Content="Avatar" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Avatars can be used to represent people or objects. It supports images, Icons, or letters." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="antd:Avatar">
|
||||
<Setter Property="Margin" Value="0 16 16 0" />
|
||||
<Setter Property="Margin" Value="0,16,16,0" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
Three sizes and two shapes are available.
|
||||
@@ -39,36 +40,45 @@
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<WrapPanel>
|
||||
<antd:Avatar Size="64" Icon="user" />
|
||||
<antd:Avatar Size="Large" Icon="user" />
|
||||
<antd:Avatar Icon="user" Size="64" />
|
||||
<antd:Avatar Icon="user" Size="Large" />
|
||||
<antd:Avatar Icon="user" />
|
||||
<antd:Avatar Size="Small" Icon="user" />
|
||||
<antd:Avatar Icon="user" Size="Small" />
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<antd:Avatar Shape="Square" Size="64" Icon="user" />
|
||||
<antd:Avatar Shape="Square" Size="Large" Icon="user" />
|
||||
<antd:Avatar Shape="Square" Icon="user" />
|
||||
<antd:Avatar Shape="Square" Size="Small" Icon="user" />
|
||||
<antd:Avatar
|
||||
Icon="user"
|
||||
Shape="Square"
|
||||
Size="64" />
|
||||
<antd:Avatar
|
||||
Icon="user"
|
||||
Shape="Square"
|
||||
Size="Large" />
|
||||
<antd:Avatar Icon="user" Shape="Square" />
|
||||
<antd:Avatar
|
||||
Icon="user"
|
||||
Shape="Square"
|
||||
Size="Small" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<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
|
||||
<StackPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Avatar Size="64" Icon="user" />\n
|
||||
\t\t<antd:Avatar Size="Large" Icon="user" />\n
|
||||
\t\t<antd:Avatar Icon="user" />\n
|
||||
\t\t<antd:Avatar Size="Small" Icon="user" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Avatar Shape="Square" Size="64" Icon="user" />\n
|
||||
\t\t<antd:Avatar Shape="Square" Size="Large" Icon="user" />\n
|
||||
\t\t<antd:Avatar Shape="Square" Icon="user" />\n
|
||||
\t\t<antd:Avatar Shape="Square" Size="Small" Icon="user" />\n
|
||||
\t</WrapPanel>
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Avatar Size="64" Icon="user" />\n
|
||||
\t\t<antd:Avatar Size="Large" Icon="user" />\n
|
||||
\t\t<antd:Avatar Icon="user" />\n
|
||||
\t\t<antd:Avatar Size="Small" Icon="user" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Avatar Shape="Square" Size="64" Icon="user" />\n
|
||||
\t\t<antd:Avatar Shape="Square" Size="Large" Icon="user" />\n
|
||||
\t\t<antd:Avatar Shape="Square" Icon="user" />\n
|
||||
\t\t<antd:Avatar Shape="Square" Size="Small" Icon="user" />\n
|
||||
\t</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -78,22 +88,28 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Avatar Background="{Binding Background}" Margin="0 0 16 0" Text="{Binding Text}" />
|
||||
<antd:AntButton x:Name="Change" Size="Small" Content="Change" />
|
||||
<antd:Avatar
|
||||
Background="{Binding Background}"
|
||||
Margin="0,0,16,0"
|
||||
Text="{Binding Text}" />
|
||||
<antd:AntButton
|
||||
Content="Change"
|
||||
Size="Small"
|
||||
x:Name="Change" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<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:Avatar Background="{Binding Background}" Margin="0 0 16 0" Text="{Binding Text}" />\n
|
||||
\t<antd:Button x:Name="Change" Size="Small" Content="Change" />\n
|
||||
\t<antd:Avatar Background="{Binding Background}" Margin="0 0 16 0" Text="{Binding Text}" />\n
|
||||
\t<antd:Button x:Name="Change" Size="Small" Content="Change" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Type">
|
||||
<antd:CodeBox.Description>
|
||||
Image, Icon and letter are supported, and the latter two kinds avatar can have custom colors and background colors.
|
||||
@@ -104,21 +120,24 @@
|
||||
<antd:Avatar Text="U" />
|
||||
<antd:Avatar>USER</antd:Avatar>
|
||||
<antd:Avatar Source="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
<antd:Avatar Text="U" Background="#FDE3CF" Foreground="#F56A00" />
|
||||
<antd:Avatar Icon="user" Background="#87D068" />
|
||||
<antd:Avatar
|
||||
Background="#FDE3CF"
|
||||
Foreground="#F56A00"
|
||||
Text="U" />
|
||||
<antd:Avatar Background="#87D068" Icon="user" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<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:Avatar Icon="user" />\n
|
||||
\t<antd:Avatar Text="U" />\n
|
||||
\t<antd:Avatar>USER</antd:Avatar>\n
|
||||
\t<antd:Avatar Source="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />\n
|
||||
\t<antd:Avatar Text="U" Background="#FDE3CF" Foreground="#F56A00" />\n
|
||||
\t<antd:Avatar Icon="user" Background="#87D068" />\n
|
||||
\t<antd:Avatar Icon="user" />\n
|
||||
\t<antd:Avatar Text="U" />\n
|
||||
\t<antd:Avatar>USER</antd:Avatar>\n
|
||||
\t<antd:Avatar Source="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />\n
|
||||
\t<antd:Avatar Text="U" Background="#FDE3CF" Foreground="#F56A00" />\n
|
||||
\t<antd:Avatar Icon="user" Background="#87D068" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -128,25 +147,31 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Badge Count="1" Margin="0 0 24 0">
|
||||
<antd:Avatar Shape="Square" Icon="user" Margin="0" />
|
||||
<antd:Badge Count="1" Margin="0,0,24,0">
|
||||
<antd:Avatar
|
||||
Icon="user"
|
||||
Margin="0"
|
||||
Shape="Square" />
|
||||
</antd:Badge>
|
||||
<antd:Badge Dot="True">
|
||||
<antd:Avatar Shape="Square" Icon="user" Margin="0" />
|
||||
<antd:Avatar
|
||||
Icon="user"
|
||||
Margin="0"
|
||||
Shape="Square" />
|
||||
</antd:Badge>
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<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:Badge Count="1" Margin="0 0 24 0">\n
|
||||
\t\t<antd:Avatar Shape="Square" Icon="user" Margin="0" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Dot="True">\n
|
||||
\t\t<antd:Avatar Shape="Square" Icon="user" Margin="0" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Count="1" Margin="0 0 24 0">\n
|
||||
\t\t<antd:Avatar Shape="Square" Icon="user" Margin="0" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Dot="True">\n
|
||||
\t\t<antd:Avatar Shape="Square" Icon="user" Margin="0" />\n
|
||||
\t</antd:Badge>\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.BadgeView"
|
||||
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">
|
||||
<UserControl
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930"
|
||||
mc:Ignorable="d"
|
||||
x:Class="AntDesignWPFDemo.Views.BadgeView"
|
||||
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:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Badge" />
|
||||
<Label Content="Badge" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Small numerical value or status descriptor for UI elements." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Badge normally appears in proximity to notifications or user avatars with eye-catching appeal, typically displaying unread messages count." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<Style x:Key="Badge" TargetType="antd:Badge">
|
||||
<Setter Property="Margin" Value="0 20 20 0" />
|
||||
<Style TargetType="antd:Badge" x:Key="Badge">
|
||||
<Setter Property="Margin" Value="0,20,20,0" />
|
||||
</Style>
|
||||
<Style x:Key="HeadExample" TargetType="Rectangle">
|
||||
<Style TargetType="Rectangle" x:Key="HeadExample">
|
||||
<Setter Property="Width" Value="42" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
<Setter Property="RadiusX" Value="4" />
|
||||
@@ -42,41 +42,44 @@
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
Simplest Usage. Badge will be hidden when count is 0, but we can use showZero to show it.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Badge Style="{StaticResource Badge}" Count="5">
|
||||
<antd:Badge Count="5" Style="{StaticResource Badge}">
|
||||
<Rectangle Style="{StaticResource HeadExample}" />
|
||||
</antd:Badge>
|
||||
<antd:Badge Style="{StaticResource Badge}" Count="0" ShowZero="True">
|
||||
<antd:Badge
|
||||
Count="0"
|
||||
ShowZero="True"
|
||||
Style="{StaticResource Badge}">
|
||||
<Rectangle Style="{StaticResource HeadExample}" />
|
||||
</antd:Badge>
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<Style x:Key="Badge" TargetType="antd:Badge">\n
|
||||
\t<Setter Property="Margin" Value="0 20 20 0" />\n
|
||||
\t<Setter Property="Margin" Value="0 20 20 0" />\n
|
||||
</Style>\n
|
||||
<Style x:Key="HeadExample" TargetType="Rectangle">\n
|
||||
\t<Setter Property="Width" Value="42" />\n
|
||||
\t<Setter Property="Height" Value="42" />\n
|
||||
\t<Setter Property="RadiusX" Value="4" />\n
|
||||
\t<Setter Property="RadiusY" Value="4" />\n
|
||||
\t<Setter Property="Fill" Value="#EEEEEE" />\n
|
||||
\t<Setter Property="Width" Value="42" />\n
|
||||
\t<Setter Property="Height" Value="42" />\n
|
||||
\t<Setter Property="RadiusX" Value="4" />\n
|
||||
\t<Setter Property="RadiusY" Value="4" />\n
|
||||
\t<Setter Property="Fill" Value="#EEEEEE" />\n
|
||||
</Style>\n\n
|
||||
<WrapPanel>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="5">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="0" ShowZero="True">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="5">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="0" ShowZero="True">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -86,46 +89,52 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Badge Style="{StaticResource Badge}" Count="99">
|
||||
<antd:Badge Count="99" Style="{StaticResource Badge}">
|
||||
<Rectangle Style="{StaticResource HeadExample}" />
|
||||
</antd:Badge>
|
||||
<antd:Badge Style="{StaticResource Badge}" Count="100">
|
||||
<antd:Badge Count="100" Style="{StaticResource Badge}">
|
||||
<Rectangle Style="{StaticResource HeadExample}" />
|
||||
</antd:Badge>
|
||||
<antd:Badge Style="{StaticResource Badge}" Count="99" OverflowCount="10">
|
||||
<antd:Badge
|
||||
Count="99"
|
||||
OverflowCount="10"
|
||||
Style="{StaticResource Badge}">
|
||||
<Rectangle Style="{StaticResource HeadExample}" />
|
||||
</antd:Badge>
|
||||
<antd:Badge Style="{StaticResource Badge}" Count="1000" OverflowCount="999">
|
||||
<antd:Badge
|
||||
Count="1000"
|
||||
OverflowCount="999"
|
||||
Style="{StaticResource Badge}">
|
||||
<Rectangle Style="{StaticResource HeadExample}" />
|
||||
</antd:Badge>
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<Style x:Key="Badge" TargetType="antd:Badge">\n
|
||||
\t<Setter Property="Margin" Value="0 20 20 0" />\n
|
||||
\t<Setter Property="Margin" Value="0 20 20 0" />\n
|
||||
</Style>\n
|
||||
<Style x:Key="HeadExample" TargetType="Rectangle">\n
|
||||
\t<Setter Property="Width" Value="42" />\n
|
||||
\t<Setter Property="Height" Value="42" />\n
|
||||
\t<Setter Property="RadiusX" Value="4" />\n
|
||||
\t<Setter Property="RadiusY" Value="4" />\n
|
||||
\t<Setter Property="Fill" Value="#EEEEEE" />\n
|
||||
\t<Setter Property="Width" Value="42" />\n
|
||||
\t<Setter Property="Height" Value="42" />\n
|
||||
\t<Setter Property="RadiusX" Value="4" />\n
|
||||
\t<Setter Property="RadiusY" Value="4" />\n
|
||||
\t<Setter Property="Fill" Value="#EEEEEE" />\n
|
||||
</Style>\n\n
|
||||
<WrapPanel>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="99">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="100">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="99" OverflowCount="10">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="1000" OverflowCount="999">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="99">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="100">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="99" OverflowCount="10">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
\t<antd:Badge Style="{StaticResource Badge}" Count="1000" OverflowCount="999">\n
|
||||
\t\t<Rectangle Style="{StaticResource HeadExample}" />\n
|
||||
\t</antd:Badge>\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -135,7 +144,7 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0 0 0 16">
|
||||
<StackPanel Margin="0,0,0,16" Orientation="Horizontal">
|
||||
<antd:Badge Status="Success" />
|
||||
<antd:Badge Status="Error" />
|
||||
<antd:Badge Status="Default" />
|
||||
@@ -152,28 +161,28 @@
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<StackPanel Orientation="Horizontal" Margin="0 0 0 16">\n
|
||||
\t\t<antd:Badge Status="Success" />\n
|
||||
\t\t<antd:Badge Status="Error" />\n
|
||||
\t\t<antd:Badge Status="Default" />\n
|
||||
\t\t<antd:Badge Status="Processing" />\n
|
||||
\t\t<antd:Badge Status="Warning" />\n
|
||||
\t</StackPanel>\n
|
||||
\t<StackPanel>\n
|
||||
\t\t<antd:Badge Status="Success" Text="Success" />\n
|
||||
\t\t<antd:Badge Status="Error" Text="Error" />\n
|
||||
\t\t<antd:Badge Status="Default" Text="Default" />\n
|
||||
\t\t<antd:Badge Status="Processing" Text="Processing" />\n
|
||||
\t\t<antd:Badge Status="Warning" Text="Warning" />\n
|
||||
\t</StackPanel>\n
|
||||
\t<StackPanel Orientation="Horizontal" Margin="0 0 0 16">\n
|
||||
\t\t<antd:Badge Status="Success" />\n
|
||||
\t\t<antd:Badge Status="Error" />\n
|
||||
\t\t<antd:Badge Status="Default" />\n
|
||||
\t\t<antd:Badge Status="Processing" />\n
|
||||
\t\t<antd:Badge Status="Warning" />\n
|
||||
\t</StackPanel>\n
|
||||
\t<StackPanel>\n
|
||||
\t\t<antd:Badge Status="Success" Text="Success" />\n
|
||||
\t\t<antd:Badge Status="Error" Text="Error" />\n
|
||||
\t\t<antd:Badge Status="Default" Text="Default" />\n
|
||||
\t\t<antd:Badge Status="Processing" Text="Processing" />\n
|
||||
\t\t<antd:Badge Status="Warning" Text="Warning" />\n
|
||||
\t</StackPanel>\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Standalone">
|
||||
<antd:CodeBox.Description>
|
||||
Used in standalone when children is empty.
|
||||
@@ -181,18 +190,21 @@
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Badge Count="25" />
|
||||
<antd:Badge Count="4" BadgeBackground="White" BadgeForeground="#999" />
|
||||
<antd:Badge Count="109" BadgeBackground="#52c41a" />
|
||||
<antd:Badge
|
||||
BadgeBackground="White"
|
||||
BadgeForeground="#999"
|
||||
Count="4" />
|
||||
<antd:Badge BadgeBackground="#52c41a" Count="109" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel Orientation="Horizontal">\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -203,7 +215,7 @@
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Badge Dot="True">
|
||||
<antd:Icon Type="notification" Foreground="Black" />
|
||||
<antd:Icon Foreground="Black" Type="notification" />
|
||||
</antd:Badge>
|
||||
<antd:Badge Count="0" Dot="True">
|
||||
<antd:Icon Type="notification" />
|
||||
@@ -214,13 +226,13 @@
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel Orientation="Horizontal">\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -231,18 +243,18 @@
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Badge Count="5" ToolTip="Badge ToolTip">
|
||||
<Rectangle ToolTip="Content ToolTip" Style="{StaticResource HeadExample}" />
|
||||
<Rectangle Style="{StaticResource HeadExample}" ToolTip="Content ToolTip" />
|
||||
</antd:Badge>
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel Orientation="Horizontal">\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
|
||||
@@ -1,219 +1,236 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.ButtonView"
|
||||
<UserControl x:Class="AntDesignWPFDemo.Views.ButtonView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
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:antd="https://github.com/ShrlAlgo/AntdWpf"
|
||||
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930">
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Button" />
|
||||
<Label Content="Button" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="To trigger an operation." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="A button means an operation (or a series of operations). Clicking a button will trigger corresponding business logic." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="antd:AntButton">
|
||||
<Setter Property="Margin" Value="0 0 8 12" />
|
||||
<Setter Property="Margin" Value="0,0,8,12" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Type">
|
||||
<antd:CodeBox.Description>
|
||||
There are `primary` button, `default` button, `dashed` button and `danger` button in antd.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>There are `solid` button, `outlined` button, `dashed` button,`text` button,`link` button and `filled` button in antd.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<antd:AntButton Type="Primary" Content="Primary" />
|
||||
<antd:AntButton Content="Default" />
|
||||
<antd:AntButton Type="Dashed" Content="Dashed" />
|
||||
<antd:AntButton Type="Danger" Content="Danger" />
|
||||
<antd:AntButton Content="Solid" Variant="Solid" />
|
||||
<antd:AntButton Content="Outlined" Variant="Outlined" />
|
||||
<antd:AntButton Content="Dashed" Variant="Dashed" />
|
||||
<antd:AntButton Content="Filled" Variant="Filled" />
|
||||
<antd:AntButton Content="Text" Variant="Text" />
|
||||
<antd:AntButton Content="Link" Variant="Link" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel Orientation="Horizontal">\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
</WrapPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
<antd:CodeBox Title="Size">
|
||||
<antd:CodeBox.Description>
|
||||
Ant Design supports a default button size as well as a large and small size.\n
|
||||
If a large or small button is desired, set the `Size` property to either `large` or `small` respectively. Omit the `Size` property for a button with the default size.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>Ant Design supports a default button size as well as a large and small size.\n
|
||||
If a large or small button is desired, set the `Size` property to either `large` or `small` respectively. Omit the `Size` property for a button with the default size.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<antd:AntButton Type="Primary" Content="Primary" />
|
||||
<antd:AntButton Content="Primary" Variant="Solid" />
|
||||
<antd:AntButton Content="Default" Size="Large" />
|
||||
<antd:AntButton Type="Dashed" Content="Dashed" />
|
||||
<antd:AntButton Type="Danger" Content="Danger" />
|
||||
<antd:AntButton Type="Primary" Icon="search" Shape="Circle" />
|
||||
<antd:AntButton Type="Primary" Icon="search" Content="Search" />
|
||||
<antd:AntButton Content="Dashed" Variant="Dashed" />
|
||||
<antd:AntButton Content="Danger" Variant="Outlined" />
|
||||
<antd:AntButton Icon="search"
|
||||
Shape="Circle"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton Content="Search"
|
||||
Icon="search"
|
||||
Variant="Solid" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel Orientation="Horizontal">\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" Size="Large" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
\t<antd:Button Type="Primary" Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Type="Primary" Icon="search" Content="Search" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Content="Default" Size="Large" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Danger" Content="Danger" />\n
|
||||
\t<antd:Button Type="Primary" Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Type="Primary" Icon="search" Content="Search" />\n
|
||||
</WrapPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
<antd:CodeBox Title="Loading">
|
||||
<antd:CodeBox.Description>
|
||||
A loading indicator can be added to a button by setting the `Loading` property on the `Button`.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>A loading indicator can be added to a button by setting the `Loading` property on the `Button`.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<antd:AntButton Type="Primary" Content="Loading" Loading="True" />
|
||||
<antd:AntButton Type="Primary" Content="Loading" Loading="True" Size="small" />
|
||||
<antd:AntButton x:Name="Click1" Type="Primary" Content="Click Me!" Loading="{Binding Loading1}" />
|
||||
<antd:AntButton x:Name="Click2" Type="Primary" Content="Click Me!" Icon="poweroff" Loading="{Binding Loading2}" />
|
||||
<antd:AntButton Shape="Circle" Loading="True" />
|
||||
<antd:AntButton Type="Primary" Shape="Circle" Loading="True" />
|
||||
<antd:AntButton Content="Loading"
|
||||
Loading="True"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton Content="Loading"
|
||||
Loading="True"
|
||||
Size="small"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton x:Name="Click1"
|
||||
Content="Click Me!"
|
||||
Loading="{Binding Loading1}"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton x:Name="Click2"
|
||||
Content="Click Me!"
|
||||
Icon="poweroff"
|
||||
Loading="{Binding Loading2}"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton Loading="True" Shape="Circle" />
|
||||
<antd:AntButton Loading="True"
|
||||
Shape="Circle"
|
||||
Variant="Solid" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel Orientation="Horizontal">\n
|
||||
\t<antd:Button Type="Primary" Content="Loading" Loading="True" />\n
|
||||
\t<antd:Button Type="Primary" Content="Loading" Loading="True" Size="small" />\n
|
||||
\t<antd:Button x:Name="Click1" Type="Primary" Content="Click Me!" Loading="{Binding Loading1}" />\n
|
||||
\t<antd:Button x:Name="Click2" Type="Primary" Content="Click Me!" Icon="poweroff" Loading="{Binding Loading2}" />\n
|
||||
\t<antd:Button Shape="Circle" Loading="True" />\n
|
||||
\t<antd:Button Type="Primary" Shape="Circle" Loading="True" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
\t<antd:Button Type="Primary" Content="Loading" Loading="True" />\n
|
||||
\t<antd:Button Type="Primary" Content="Loading" Loading="True" Size="small" />\n
|
||||
\t<antd:Button x:Name="Click1" Type="Primary" Content="Click Me!" Loading="{Binding Loading1}" />\n
|
||||
\t<antd:Button x:Name="Click2" Type="Primary" Content="Click Me!" Icon="poweroff" Loading="{Binding Loading2}" />\n
|
||||
\t<antd:Button Shape="Circle" Loading="True" />\n
|
||||
\t<antd:Button Type="Primary" Shape="Circle" Loading="True" />\n
|
||||
</WrapPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Icon">
|
||||
<antd:CodeBox.Description>
|
||||
`Button` components can contain an `Icon`. This is done by setting the `icon` property or placing an `Icon` component within the `Button`\n
|
||||
If you want specific control over the positioning and placement of the Icon, then that should be done by placing the `Icon` component within the `Button` rather than using the `icon` property.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>`Button` components can contain an `Icon`. This is done by setting the `icon` property or placing an `Icon` component within the `Button`\n
|
||||
If you want specific control over the positioning and placement of the Icon, then that should be done by placing the `Icon` component within the `Button` rather than using the `icon` property.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<antd:AntButton Type="Primary" Icon="search" Shape="Circle" />
|
||||
<antd:AntButton Type="Primary" Icon="search" Content="Search" />
|
||||
<antd:AntButton Icon="search"
|
||||
Shape="Circle"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton Content="Search"
|
||||
Icon="search"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton Icon="search" Shape="Circle" />
|
||||
<antd:AntButton Icon="search" Content="Search" />
|
||||
<antd:AntButton Type="Dashed" Icon="search" Shape="Circle" />
|
||||
<antd:AntButton Type="Dashed" Icon="search" Content="Search" />
|
||||
<antd:AntButton Type="Danger" Icon="search" Shape="Circle" />
|
||||
<antd:AntButton Type="Danger" Icon="search" Content="Search" />
|
||||
<antd:AntButton Content="Search" Icon="search" />
|
||||
<antd:AntButton Icon="search"
|
||||
Shape="Circle"
|
||||
Variant="Dashed" />
|
||||
<antd:AntButton Content="Search"
|
||||
Icon="search"
|
||||
Variant="Dashed" />
|
||||
<antd:AntButton Icon="search"
|
||||
Shape="Circle"
|
||||
Variant="Outlined" />
|
||||
<antd:AntButton Content="Search"
|
||||
Icon="search"
|
||||
Variant="Outlined" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel Orientation="Horizontal">\n
|
||||
\t<antd:Button Type="Primary" Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Type="Primary" Icon="search" Content="Search" />\n
|
||||
\t<antd:Button Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Icon="search" Content="Search" />\n
|
||||
\t<antd:Button Type="Dashed" Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Type="Dashed" Icon="search" Content="Search" />\n
|
||||
\t<antd:Button Type="Danger" Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Type="Danger" Icon="search" Content="Search" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
\t<antd:Button Type="Primary" Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Type="Primary" Icon="search" Content="Search" />\n
|
||||
\t<antd:Button Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Icon="search" Content="Search" />\n
|
||||
\t<antd:Button Type="Dashed" Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Type="Dashed" Icon="search" Content="Search" />\n
|
||||
\t<antd:Button Type="Danger" Icon="search" Shape="Circle" />\n
|
||||
\t<antd:Button Type="Danger" Icon="search" Content="Search" />\n
|
||||
</WrapPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
<antd:CodeBox Title="Disabled">
|
||||
<antd:CodeBox.Description>
|
||||
To mark a button as disabled, set the `IsEnabled` property to `False`
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>To mark a button as disabled, set the `IsEnabled` property to `False`</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<antd:AntButton Type="Primary" Content="Primary" />
|
||||
<antd:AntButton Type="Primary" Content="Primary(disabled)" IsEnabled="False" />
|
||||
<antd:AntButton Content="Primary" Variant="Solid" />
|
||||
<antd:AntButton Content="Primary(disabled)"
|
||||
IsEnabled="False"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton Content="Default" />
|
||||
<antd:AntButton Content="Default(disabled)" IsEnabled="False" />
|
||||
<antd:AntButton Type="Dashed" Content="Dashed" />
|
||||
<antd:AntButton Type="Dashed" Content="Dashed(disabled)" IsEnabled="False" />
|
||||
<antd:AntButton Content="Dashed" Variant="Dashed" />
|
||||
<antd:AntButton Content="Dashed(disabled)"
|
||||
IsEnabled="False"
|
||||
Variant="Dashed" />
|
||||
<StackPanel Background="#BEC8C8">
|
||||
<WrapPanel Margin="8 8 8 0">
|
||||
<WrapPanel Margin="8,8,8,0">
|
||||
<antd:AntButton Content="Ghost" Ghost="True" />
|
||||
<antd:AntButton Content="Ghost(disabled)" Ghost="True" IsEnabled="False" />
|
||||
<antd:AntButton Content="Ghost(disabled)"
|
||||
Ghost="True"
|
||||
IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<WrapPanel Orientation="Horizontal">\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Type="Primary" Content="Primary(disabled)" IsEnabled="False" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Content="Default(disabled)" IsEnabled="False" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed(disabled)" IsEnabled="False" />\n
|
||||
\t<StackPanel Background="#BEC8C8">\n
|
||||
\t\t<WrapPanel Margin="8 8 8 0">\n
|
||||
\t\t\t<antd:Button Content="Ghost" Ghost="True" />\n
|
||||
\t\t\t<antd:Button Content="Ghost(disabled)" Ghost="True" IsEnabled="False" />\n
|
||||
\t\t</WrapPanel>\n
|
||||
\t</StackPanel>\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel Orientation="Horizontal">\n
|
||||
\t<antd:Button Type="Primary" Content="Primary" />\n
|
||||
\t<antd:Button Type="Primary" Content="Primary(disabled)" IsEnabled="False" />\n
|
||||
\t<antd:Button Content="Default" />\n
|
||||
\t<antd:Button Content="Default(disabled)" IsEnabled="False" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed" />\n
|
||||
\t<antd:Button Type="Dashed" Content="Dashed(disabled)" IsEnabled="False" />\n
|
||||
\t<StackPanel Background="#BEC8C8">\n
|
||||
\t\t<WrapPanel Margin="8 8 8 0">\n
|
||||
\t\t\t<antd:Button Content="Ghost" Ghost="True" />\n
|
||||
\t\t\t<antd:Button Content="Ghost(disabled)" Ghost="True" IsEnabled="False" />\n
|
||||
\t\t</WrapPanel>\n
|
||||
\t</StackPanel>\n
|
||||
</WrapPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
<antd:CodeBox Title="Ghost Button">
|
||||
<antd:CodeBox.Description>
|
||||
`Ghost` property will make button's background transparent, it is common used in colored background.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>`Ghost` property will make button's background transparent, it is common used in colored background.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel Background="#BEC8C8">
|
||||
<WrapPanel Margin="16 26 16 16" Orientation="Horizontal">
|
||||
<antd:AntButton Type="Primary" Content="Primary" Ghost="True" />
|
||||
<WrapPanel Margin="16,26,16,16" Orientation="Horizontal">
|
||||
<antd:AntButton Content="Primary"
|
||||
Ghost="True"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton Content="Default" Ghost="True" />
|
||||
<antd:AntButton Type="Dashed" Content="Dashed" Ghost="True" />
|
||||
<antd:AntButton Type="Danger" Content="Danger" Ghost="True" />
|
||||
<antd:AntButton Content="Dashed"
|
||||
Ghost="True"
|
||||
Variant="Dashed" />
|
||||
<antd:AntButton Content="Danger"
|
||||
Ghost="True"
|
||||
Variant="Outlined" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel Background="#BEC8C8">\n
|
||||
\t<WrapPanel Margin="16 26 16 16" Orientation="Horizontal">\n
|
||||
\t\t<antd:Button Type="Primary" Content="Primary" Ghost="True" />\n
|
||||
\t\t<antd:Button Content="Default" Ghost="True" />\n
|
||||
\t\t<antd:Button Type="Dashed" Content="Dashed" Ghost="True" />\n
|
||||
\t\t<antd:Button Type="Danger" Content="Danger" Ghost="True" />\n
|
||||
\t</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
\t<WrapPanel Margin="16 26 16 16" Orientation="Horizontal">\n
|
||||
\t\t<antd:Button Type="Primary" Content="Primary" Ghost="True" />\n
|
||||
\t\t<antd:Button Content="Default" Ghost="True" />\n
|
||||
\t\t<antd:Button Type="Dashed" Content="Dashed" Ghost="True" />\n
|
||||
\t\t<antd:Button Type="Danger" Content="Danger" Ghost="True" />\n
|
||||
\t</WrapPanel>
|
||||
</StackPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -1,145 +1,145 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.CheckBoxView"
|
||||
<UserControl x:Class="AntDesignWPFDemo.Views.CheckBoxView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
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:antd="https://github.com/ShrlAlgo/AntdWpf"
|
||||
xmlns:viewmodels="clr-namespace:AntDesignWPFDemo.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodels:CheckBoxViewModel}"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Checkbox" />
|
||||
<Label Content="Checkbox" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Checkbox component." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<TextBlock Style="{StaticResource Ant.P}"
|
||||
TextWrapping="Wrap"
|
||||
Text="Used for selecting multiple values from several options.
If you use only one checkbox, it is the same as using Switch to toggle between two states. The difference is that Switch will trigger the state change directly, but Checkbox just marks the state as changed and this needs to be submitted." />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}"
|
||||
Text="Used for selecting multiple values from several options.
If you use only one checkbox, it is the same as using Switch to toggle between two states. The difference is that Switch will trigger the state change directly, but Checkbox just marks the state as changed and this needs to be submitted."
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
Basic usage of checkbox.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>Basic usage of checkbox.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<CheckBox Content="Checkbox" />
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
||||
<CheckBox Content="Checkbox" />
|
||||
</antd:CodeBox.Code>
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Styles/antd.xaml" />\n\n
|
||||
<CheckBox Content="Checkbox" /></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
<antd:CodeBox Title="Controlled Checkbox">
|
||||
<antd:CodeBox.Description>
|
||||
Communicated with other components.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>Communicated with other components.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<CheckBox Content="{Binding CheckBox, Mode=OneWay}" IsChecked="{Binding IsChecked}" IsEnabled="{Binding IsEnabled}" />
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 20 0 0">
|
||||
<antd:AntButton x:Name="ToggleCheck" Type="Primary" Content="{Binding Check, Mode=OneWay}" Margin="0 0 10 0"/>
|
||||
<antd:AntButton x:Name="ToggleEnabled" Type="Primary" Content="{Binding Enabled, Mode=OneWay}" />
|
||||
<CheckBox Content="{Binding CheckBox, Mode=OneWay}"
|
||||
IsChecked="{Binding IsChecked}"
|
||||
IsEnabled="{Binding IsEnabled}" />
|
||||
<StackPanel Grid.Row="1"
|
||||
Margin="0,20,0,0"
|
||||
Orientation="Horizontal">
|
||||
<antd:AntButton x:Name="ToggleCheck"
|
||||
Margin="0,0,10,0"
|
||||
Content="{Binding Check, Mode=OneWay}"
|
||||
Variant="Solid" />
|
||||
<antd:AntButton x:Name="ToggleEnabled"
|
||||
Content="{Binding Enabled, Mode=OneWay}"
|
||||
Variant="Solid" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Styles/antd.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<Grid>\n
|
||||
\t<Grid.RowDefinitions>\n
|
||||
\t\t<RowDefinition />\n
|
||||
\t\t<RowDefinition />\n
|
||||
\t</Grid.RowDefinitions>\n
|
||||
\t<CheckBox Content="{Binding CheckBox, Mode=OneWay}" IsChecked="{Binding IsChecked}" IsEnabled="{Binding IsEnabled}" />\n
|
||||
\t<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 20 0 0">\n
|
||||
\t\t<antd:Button x:Name="ToggleCheck" Type="Primary" Content="{Binding Check, Mode=OneWay}" Margin="0 0 10 0"/>\n
|
||||
\t\t<antd:Button x:Name="ToggleEnabled" Type="Primary" Content="{Binding Enabled, Mode=OneWay}" />\n
|
||||
\t</StackPanel>\n
|
||||
</Grid>
|
||||
</antd:CodeBox.Code>
|
||||
\t<Grid.RowDefinitions>\n
|
||||
\t\t<RowDefinition />\n
|
||||
\t\t<RowDefinition />\n
|
||||
\t</Grid.RowDefinitions>\n
|
||||
\t<CheckBox Content="{Binding CheckBox, Mode=OneWay}" IsChecked="{Binding IsChecked}" IsEnabled="{Binding IsEnabled}" />\n
|
||||
\t<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 20 0 0">\n
|
||||
\t\t<antd:Button x:Name="ToggleCheck" Type="Primary" Content="{Binding Check, Mode=OneWay}" Margin="0 0 10 0"/>\n
|
||||
\t\t<antd:Button x:Name="ToggleEnabled" Type="Primary" Content="{Binding Enabled, Mode=OneWay}" />\n
|
||||
\t</StackPanel>\n
|
||||
</Grid></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Disabled">
|
||||
<antd:CodeBox.Description>
|
||||
Disabled checkbox.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>Disabled checkbox.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Content="Checkbox" IsEnabled="False" />
|
||||
<CheckBox Content="Checkbox" IsEnabled="False" IsChecked="True" />
|
||||
<CheckBox Content="Checkbox"
|
||||
IsChecked="True"
|
||||
IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Styles/antd.xaml" />\n\n
|
||||
<StackPanel Orientation="Horizontal">\n
|
||||
\t<CheckBox Content="Checkbox" IsEnabled="False" />\n
|
||||
\t<CheckBox Content="Checkbox" IsEnabled="False" IsChecked="True" />\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
\t<CheckBox Content="Checkbox" IsEnabled="False" />\n
|
||||
\t<CheckBox Content="Checkbox" IsEnabled="False" IsChecked="True" />\n
|
||||
</StackPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
<antd:CodeBox Title="Check all">
|
||||
<antd:CodeBox.Description>
|
||||
The `indeterminate` state can help you to achieve a 'check all' effect.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>The `indeterminate` state can help you to achieve a 'check all' effect.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Border BorderBrush="#E9E9E9" BorderThickness="0 0 0 1" Padding="0 0 0 2">
|
||||
<Border BorderBrush="#E9E9E9"
|
||||
BorderThickness="0,0,0,1"
|
||||
Padding="0,0,0,2">
|
||||
<CheckBox x:Name="CheckAll" Content="Check all" />
|
||||
</Border>
|
||||
<WrapPanel Grid.Row="1" Orientation="Horizontal" Margin="0 16 0 0">
|
||||
<WrapPanel Grid.Row="1"
|
||||
Margin="0,16,0,0"
|
||||
Orientation="Horizontal">
|
||||
<CheckBox x:Name="Apple" Content="Apple" />
|
||||
<CheckBox x:Name="Pear" Content="Pear" />
|
||||
<CheckBox x:Name="Orange" Content="Orange" />
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Styles/antd.xaml" />\n\n
|
||||
<Grid>\n
|
||||
\t<Grid.RowDefinitions>\n
|
||||
\t\t<RowDefinition />\n
|
||||
\t\t<RowDefinition />\n
|
||||
\t</Grid.RowDefinitions>\n
|
||||
\t<Border BorderBrush="#E9E9E9" BorderThickness="0 0 0 1" Padding="0 0 0 2">\n
|
||||
\t\t<CheckBox x:Name="CheckAll" Content="Check all" />\n
|
||||
\t</Border>\n
|
||||
\t<WrapPanel Grid.Row="1" Orientation="Horizontal" Margin="0 16 0 0">\n
|
||||
\t\t<CheckBox x:Name="Apple" Content="Apple" />\n
|
||||
\t\t<CheckBox x:Name="Pear" Content="Pear" />\n
|
||||
\t\t<CheckBox x:Name="Orange" Content="Orange" />\n
|
||||
\t</WrapPanel>\n
|
||||
</Grid>
|
||||
</antd:CodeBox.Code>
|
||||
\t<Grid.RowDefinitions>\n
|
||||
\t\t<RowDefinition />\n
|
||||
\t\t<RowDefinition />\n
|
||||
\t</Grid.RowDefinitions>\n
|
||||
\t<Border BorderBrush="#E9E9E9" BorderThickness="0 0 0 1" Padding="0 0 0 2">\n
|
||||
\t\t<CheckBox x:Name="CheckAll" Content="Check all" />\n
|
||||
\t</Border>\n
|
||||
\t<WrapPanel Grid.Row="1" Orientation="Horizontal" Margin="0 16 0 0">\n
|
||||
\t\t<CheckBox x:Name="Apple" Content="Apple" />\n
|
||||
\t\t<CheckBox x:Name="Pear" Content="Pear" />\n
|
||||
\t\t<CheckBox x:Name="Orange" Content="Orange" />\n
|
||||
\t</WrapPanel>\n
|
||||
</Grid></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
15
AntdWpfDemo/Views/DataGridView.xaml
Normal file
15
AntdWpfDemo/Views/DataGridView.xaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.DataGridView"
|
||||
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:local="clr-namespace:AntdWpfDemo.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewmodels="clr-namespace:AntdWpfDemo.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodels:DataGridViewModel}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800">
|
||||
<Grid>
|
||||
<DataGrid ItemsSource="{Binding TestData}" HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
AntdWpfDemo/Views/DataGridView.xaml.cs
Normal file
28
AntdWpfDemo/Views/DataGridView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace AntdWpfDemo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// DataGridView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class DataGridView : UserControl
|
||||
{
|
||||
public DataGridView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +1,39 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.IconView"
|
||||
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">
|
||||
<UserControl
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930"
|
||||
mc:Ignorable="d"
|
||||
x:Class="AntDesignWPFDemo.Views.IconView"
|
||||
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:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Icon" />
|
||||
<Label Content="Icon" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Semantic vector graphics." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="antd:Icon">
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Margin" Value="0 0 8 0" />
|
||||
<Setter Property="Margin" Value="0,0,8,0" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
Use tag `<antd:Icon />` to create an icon and set its type in the `Type` property. Specific the `Spin` property to show spinning animation and the `Theme` property to switch different themes.
|
||||
@@ -40,17 +41,17 @@
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Icon Type="check-circle" />
|
||||
<antd:Icon Type="check-circle" Theme="Filled" />
|
||||
<antd:Icon Theme="Filled" Type="check-circle" />
|
||||
<antd:Icon Type="loading" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>\n
|
||||
<antd:Icon Type="check-circle" />\n
|
||||
<antd:Icon Type="check-circle" Theme="Filled" />\n
|
||||
<antd:Icon Type="loading" />\n
|
||||
<antd:Icon Type="check-circle" />\n
|
||||
<antd:Icon Type="check-circle" Theme="Filled" />\n
|
||||
<antd:Icon Type="loading" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -67,46 +68,50 @@
|
||||
<WrapPanel>
|
||||
<WrapPanel.Resources>
|
||||
<StreamGeometry x:Key="anticon.heart">M 923 283.6 c -13.4 -31.1 -32.6 -58.9 -56.9 -82.8 c -24.3 -23.8 -52.5 -42.4 -84 -55.5 c -32.5 -13.5 -66.9 -20.3 -102.4 -20.3 c -49.3 0 -97.4 13.5 -139.2 39 c -10 6.1 -19.5 12.8 -28.5 20.1 c -9 -7.3 -18.5 -14 -28.5 -20.1 c -41.8 -25.5 -89.9 -39 -139.2 -39 c -35.5 0 -69.9 6.8 -102.4 20.3 c -31.4 13 -59.7 31.7 -84 55.5 c -24.4 23.9 -43.5 51.7 -56.9 82.8 c -13.9 32.3 -21 66.6 -21 101.9 c 0 33.3 6.8 68 20.3 103.3 c 11.3 29.5 27.5 60.1 48.2 91 c 32.8 48.9 77.9 99.9 133.9 151.6 c 92.8 85.7 184.7 144.9 188.6 147.3 l 23.7 15.2 c 10.5 6.7 24 6.7 34.5 0 l 23.7 -15.2 c 3.9 -2.5 95.7 -61.6 188.6 -147.3 c 56 -51.7 101.1 -102.7 133.9 -151.6 c 20.7 -30.9 37 -61.5 48.2 -91 c 13.5 -35.3 20.3 -70 20.3 -103.3 c 0.1 -35.3 -7 -69.6 -20.9 -101.9 Z</StreamGeometry>
|
||||
<!-- Colorful -->
|
||||
<!-- Colorful -->
|
||||
<GeometryGroup x:Key="anticon.panda">
|
||||
<PathGeometry antd:Icon.Fill="#6b676e" Figures="M 99.096 315.634 s -82.58 -64.032 -82.58 -132.13 c 0 -66.064 33.032 -165.162 148.646 -148.646 c 83.37 11.91 99.096 165.162 99.096 165.162 l -165.162 115.614 Z M 924.906 315.634 s 82.58 -64.032 82.58 -132.13 c 0 -66.064 -33.032 -165.162 -148.646 -148.646 c -83.37 11.91 -99.096 165.162 -99.096 165.162 l 165.162 115.614 Z" />
|
||||
<PathGeometry antd:Icon.Fill="#ffebd2" Figures="M 1024 561.548 c 0 264.526 -229.23 429.42 -512.002 429.42 S 0 826.076 0 561.548 S 283.96 66.064 512.002 66.064 S 1024 297.022 1024 561.548 Z" />
|
||||
<PathGeometry antd:Icon.Fill="#e9d7c3" Figures="M 330.324 842.126 c 0 82.096 81.34 148.646 181.678 148.646 s 181.678 -66.55 181.678 -148.646 H 330.324 Z" />
|
||||
<PathGeometry antd:Icon.Fill="#ffffff" Figures="M 644.13 611.098 C 594.582 528.516 561.55 512 512.002 512 c -49.548 0 -82.58 16.516 -132.13 99.096 c -42.488 70.814 -78.73 211.264 -49.548 247.742 c 66.064 82.58 165.162 33.032 181.678 33.032 c 16.516 0 115.614 49.548 181.678 -33.032 c 29.18 -36.476 -7.064 -176.93 -49.55 -247.74 Z" />
|
||||
<PathGeometry antd:Icon.Fill="#6b676e" Figures="M 611.098 495.484 c 0 -45.608 36.974 -82.58 82.58 -82.58 c 49.548 0 198.194 99.098 198.194 165.162 s -79.934 144.904 -148.646 99.096 c -49.548 -33.032 -132.128 -148.646 -132.128 -181.678 Z M 412.904 495.484 c 0 -45.608 -36.974 -82.58 -82.58 -82.58 c -49.548 0 -198.194 99.098 -198.194 165.162 s 79.934 144.904 148.646 99.096 c 49.548 -33.032 132.128 -148.646 132.128 -181.678 Z" />
|
||||
<PathGeometry antd:Icon.Fill="#464655" Figures="M 512.002 726.622 c -30.06 0 -115.614 5.668 -115.614 33.032 c 0 49.638 105.484 85.24 115.614 82.58 c 10.128 2.66 115.614 -32.944 115.614 -82.58 c -0.002 -27.366 -85.556 -33.032 -115.614 -33.032 Z" />
|
||||
<PathGeometry antd:Icon.Fill="#464655" Figures="M 330.324 495.484 m -33.032 0 a 33.032 33.032 0 1 0 66.064 0 a 33.032 33.032 0 1 0 -66.064 0 Z" />
|
||||
<PathGeometry antd:Icon.Fill="#464655" Figures="M 693.678 495.484 m -33.032 0 a 33.032 33.032 0 1 0 66.064 0 a 33.032 33.032 0 1 0 -66.064 0 Z" />
|
||||
<PathGeometry Figures="M 99.096 315.634 s -82.58 -64.032 -82.58 -132.13 c 0 -66.064 33.032 -165.162 148.646 -148.646 c 83.37 11.91 99.096 165.162 99.096 165.162 l -165.162 115.614 Z M 924.906 315.634 s 82.58 -64.032 82.58 -132.13 c 0 -66.064 -33.032 -165.162 -148.646 -148.646 c -83.37 11.91 -99.096 165.162 -99.096 165.162 l 165.162 115.614 Z" antd:Icon.Fill="#6b676e" />
|
||||
<PathGeometry Figures="M 1024 561.548 c 0 264.526 -229.23 429.42 -512.002 429.42 S 0 826.076 0 561.548 S 283.96 66.064 512.002 66.064 S 1024 297.022 1024 561.548 Z" antd:Icon.Fill="#ffebd2" />
|
||||
<PathGeometry Figures="M 330.324 842.126 c 0 82.096 81.34 148.646 181.678 148.646 s 181.678 -66.55 181.678 -148.646 H 330.324 Z" antd:Icon.Fill="#e9d7c3" />
|
||||
<PathGeometry Figures="M 644.13 611.098 C 594.582 528.516 561.55 512 512.002 512 c -49.548 0 -82.58 16.516 -132.13 99.096 c -42.488 70.814 -78.73 211.264 -49.548 247.742 c 66.064 82.58 165.162 33.032 181.678 33.032 c 16.516 0 115.614 49.548 181.678 -33.032 c 29.18 -36.476 -7.064 -176.93 -49.55 -247.74 Z" antd:Icon.Fill="#ffffff" />
|
||||
<PathGeometry Figures="M 611.098 495.484 c 0 -45.608 36.974 -82.58 82.58 -82.58 c 49.548 0 198.194 99.098 198.194 165.162 s -79.934 144.904 -148.646 99.096 c -49.548 -33.032 -132.128 -148.646 -132.128 -181.678 Z M 412.904 495.484 c 0 -45.608 -36.974 -82.58 -82.58 -82.58 c -49.548 0 -198.194 99.098 -198.194 165.162 s 79.934 144.904 148.646 99.096 c 49.548 -33.032 132.128 -148.646 132.128 -181.678 Z" antd:Icon.Fill="#6b676e" />
|
||||
<PathGeometry Figures="M 512.002 726.622 c -30.06 0 -115.614 5.668 -115.614 33.032 c 0 49.638 105.484 85.24 115.614 82.58 c 10.128 2.66 115.614 -32.944 115.614 -82.58 c -0.002 -27.366 -85.556 -33.032 -115.614 -33.032 Z" antd:Icon.Fill="#464655" />
|
||||
<PathGeometry Figures="M 330.324 495.484 m -33.032 0 a 33.032 33.032 0 1 0 66.064 0 a 33.032 33.032 0 1 0 -66.064 0 Z" antd:Icon.Fill="#464655" />
|
||||
<PathGeometry Figures="M 693.678 495.484 m -33.032 0 a 33.032 33.032 0 1 0 66.064 0 a 33.032 33.032 0 1 0 -66.064 0 Z" antd:Icon.Fill="#464655" />
|
||||
</GeometryGroup>
|
||||
</WrapPanel.Resources>
|
||||
<antd:Icon Type="heart" FontSize="14" VerticalAlignment="Center" Foreground="HotPink" />
|
||||
<antd:Icon Type="panda" FontSize="32" />
|
||||
<antd:Icon
|
||||
FontSize="14"
|
||||
Foreground="HotPink"
|
||||
Type="heart"
|
||||
VerticalAlignment="Center" />
|
||||
<antd:Icon FontSize="32" Type="panda" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>\n
|
||||
\t<WrapPanel.Resources>\n
|
||||
\t\t<StreamGeometry x:Key="anticon.heart">M 923 283.6 c -13.4 -31.1 -32.6 -58.9 -56.9 -82.8 c -24.3 -23.8 -52.5 -42.4 -84 -55.5 c -32.5 -13.5 -66.9 -20.3 -102.4 -20.3 c -49.3 0 -97.4 13.5 -139.2 39 c -10 6.1 -19.5 12.8 -28.5 20.1 c -9 -7.3 -18.5 -14 -28.5 -20.1 c -41.8 -25.5 -89.9 -39 -139.2 -39 c -35.5 0 -69.9 6.8 -102.4 20.3 c -31.4 13 -59.7 31.7 -84 55.5 c -24.4 23.9 -43.5 51.7 -56.9 82.8 c -13.9 32.3 -21 66.6 -21 101.9 c 0 33.3 6.8 68 20.3 103.3 c 11.3 29.5 27.5 60.1 48.2 91 c 32.8 48.9 77.9 99.9 133.9 151.6 c 92.8 85.7 184.7 144.9 188.6 147.3 l 23.7 15.2 c 10.5 6.7 24 6.7 34.5 0 l 23.7 -15.2 c 3.9 -2.5 95.7 -61.6 188.6 -147.3 c 56 -51.7 101.1 -102.7 133.9 -151.6 c 20.7 -30.9 37 -61.5 48.2 -91 c 13.5 -35.3 20.3 -70 20.3 -103.3 c 0.1 -35.3 -7 -69.6 -20.9 -101.9 Z</StreamGeometry>\n
|
||||
\t\t<!-- Colorful -->\n
|
||||
\t\t<GeometryGroup x:Key="anticon.panda">\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#6b676e" Figures="M 99.096 315.634 s -82.58 -64.032 -82.58 -132.13 c 0 -66.064 33.032 -165.162 148.646 -148.646 c 83.37 11.91 99.096 165.162 99.096 165.162 l -165.162 115.614 Z M 924.906 315.634 s 82.58 -64.032 82.58 -132.13 c 0 -66.064 -33.032 -165.162 -148.646 -148.646 c -83.37 11.91 -99.096 165.162 -99.096 165.162 l 165.162 115.614 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#ffebd2" Figures="M 1024 561.548 c 0 264.526 -229.23 429.42 -512.002 429.42 S 0 826.076 0 561.548 S 283.96 66.064 512.002 66.064 S 1024 297.022 1024 561.548 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#e9d7c3" Figures="M 330.324 842.126 c 0 82.096 81.34 148.646 181.678 148.646 s 181.678 -66.55 181.678 -148.646 H 330.324 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#ffffff" Figures="M 644.13 611.098 C 594.582 528.516 561.55 512 512.002 512 c -49.548 0 -82.58 16.516 -132.13 99.096 c -42.488 70.814 -78.73 211.264 -49.548 247.742 c 66.064 82.58 165.162 33.032 181.678 33.032 c 16.516 0 115.614 49.548 181.678 -33.032 c 29.18 -36.476 -7.064 -176.93 -49.55 -247.74 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#6b676e" Figures="M 611.098 495.484 c 0 -45.608 36.974 -82.58 82.58 -82.58 c 49.548 0 198.194 99.098 198.194 165.162 s -79.934 144.904 -148.646 99.096 c -49.548 -33.032 -132.128 -148.646 -132.128 -181.678 Z M 412.904 495.484 c 0 -45.608 -36.974 -82.58 -82.58 -82.58 c -49.548 0 -198.194 99.098 -198.194 165.162 s 79.934 144.904 148.646 99.096 c 49.548 -33.032 132.128 -148.646 132.128 -181.678 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#464655" Figures="M 512.002 726.622 c -30.06 0 -115.614 5.668 -115.614 33.032 c 0 49.638 105.484 85.24 115.614 82.58 c 10.128 2.66 115.614 -32.944 115.614 -82.58 c -0.002 -27.366 -85.556 -33.032 -115.614 -33.032 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#464655" Figures="M 330.324 495.484 m -33.032 0 a 33.032 33.032 0 1 0 66.064 0 a 33.032 33.032 0 1 0 -66.064 0 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#464655" Figures="M 693.678 495.484 m -33.032 0 a 33.032 33.032 0 1 0 66.064 0 a 33.032 33.032 0 1 0 -66.064 0 Z" />\n
|
||||
\t\t</GeometryGroup>\n
|
||||
\t</WrapPanel.Resources>\n
|
||||
\t<antd:Icon Type="heart" FontSize="14" VerticalAlignment="Center" Foreground="HotPink" />\n
|
||||
\t<antd:Icon Type="panda" FontSize="32" Theme="Colorful" />\n
|
||||
\t<WrapPanel.Resources>\n
|
||||
\t\t<StreamGeometry x:Key="anticon.heart">M 923 283.6 c -13.4 -31.1 -32.6 -58.9 -56.9 -82.8 c -24.3 -23.8 -52.5 -42.4 -84 -55.5 c -32.5 -13.5 -66.9 -20.3 -102.4 -20.3 c -49.3 0 -97.4 13.5 -139.2 39 c -10 6.1 -19.5 12.8 -28.5 20.1 c -9 -7.3 -18.5 -14 -28.5 -20.1 c -41.8 -25.5 -89.9 -39 -139.2 -39 c -35.5 0 -69.9 6.8 -102.4 20.3 c -31.4 13 -59.7 31.7 -84 55.5 c -24.4 23.9 -43.5 51.7 -56.9 82.8 c -13.9 32.3 -21 66.6 -21 101.9 c 0 33.3 6.8 68 20.3 103.3 c 11.3 29.5 27.5 60.1 48.2 91 c 32.8 48.9 77.9 99.9 133.9 151.6 c 92.8 85.7 184.7 144.9 188.6 147.3 l 23.7 15.2 c 10.5 6.7 24 6.7 34.5 0 l 23.7 -15.2 c 3.9 -2.5 95.7 -61.6 188.6 -147.3 c 56 -51.7 101.1 -102.7 133.9 -151.6 c 20.7 -30.9 37 -61.5 48.2 -91 c 13.5 -35.3 20.3 -70 20.3 -103.3 c 0.1 -35.3 -7 -69.6 -20.9 -101.9 Z</StreamGeometry>\n
|
||||
\t\t<!-- Colorful -->\n
|
||||
\t\t<GeometryGroup x:Key="anticon.panda">\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#6b676e" Figures="M 99.096 315.634 s -82.58 -64.032 -82.58 -132.13 c 0 -66.064 33.032 -165.162 148.646 -148.646 c 83.37 11.91 99.096 165.162 99.096 165.162 l -165.162 115.614 Z M 924.906 315.634 s 82.58 -64.032 82.58 -132.13 c 0 -66.064 -33.032 -165.162 -148.646 -148.646 c -83.37 11.91 -99.096 165.162 -99.096 165.162 l 165.162 115.614 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#ffebd2" Figures="M 1024 561.548 c 0 264.526 -229.23 429.42 -512.002 429.42 S 0 826.076 0 561.548 S 283.96 66.064 512.002 66.064 S 1024 297.022 1024 561.548 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#e9d7c3" Figures="M 330.324 842.126 c 0 82.096 81.34 148.646 181.678 148.646 s 181.678 -66.55 181.678 -148.646 H 330.324 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#ffffff" Figures="M 644.13 611.098 C 594.582 528.516 561.55 512 512.002 512 c -49.548 0 -82.58 16.516 -132.13 99.096 c -42.488 70.814 -78.73 211.264 -49.548 247.742 c 66.064 82.58 165.162 33.032 181.678 33.032 c 16.516 0 115.614 49.548 181.678 -33.032 c 29.18 -36.476 -7.064 -176.93 -49.55 -247.74 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#6b676e" Figures="M 611.098 495.484 c 0 -45.608 36.974 -82.58 82.58 -82.58 c 49.548 0 198.194 99.098 198.194 165.162 s -79.934 144.904 -148.646 99.096 c -49.548 -33.032 -132.128 -148.646 -132.128 -181.678 Z M 412.904 495.484 c 0 -45.608 -36.974 -82.58 -82.58 -82.58 c -49.548 0 -198.194 99.098 -198.194 165.162 s 79.934 144.904 148.646 99.096 c 49.548 -33.032 132.128 -148.646 132.128 -181.678 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#464655" Figures="M 512.002 726.622 c -30.06 0 -115.614 5.668 -115.614 33.032 c 0 49.638 105.484 85.24 115.614 82.58 c 10.128 2.66 115.614 -32.944 115.614 -82.58 c -0.002 -27.366 -85.556 -33.032 -115.614 -33.032 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#464655" Figures="M 330.324 495.484 m -33.032 0 a 33.032 33.032 0 1 0 66.064 0 a 33.032 33.032 0 1 0 -66.064 0 Z" />\n
|
||||
\t\t\t<PathGeometry antd:Icon.Fill="#464655" Figures="M 693.678 495.484 m -33.032 0 a 33.032 33.032 0 1 0 66.064 0 a 33.032 33.032 0 1 0 -66.064 0 Z" />\n
|
||||
\t\t</GeometryGroup>\n
|
||||
\t</WrapPanel.Resources>\n
|
||||
\t<antd:Icon Type="heart" FontSize="14" VerticalAlignment="Center" Foreground="HotPink" />\n
|
||||
\t<antd:Icon Type="panda" FontSize="32" Theme="Colorful" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Colourful icon">
|
||||
<antd:CodeBox.Description>
|
||||
Specific them property `Theme` to `Colorful` to render colourful icons.
|
||||
@@ -123,26 +128,32 @@
|
||||
<PathGeometry Figures="M 679.7 201 c -73.1 0 -136.5 40.8 -167.7 100.4 C 480.8 241.8 417.4 201 344.3 201 c -104 0 -188.3 82.6 -188.3 184.5 c 0 201.2 356 429.3 356 429.3 s 356 -228.1 356 -429.3 C 868 283.6 783.7 201 679.7 201 Z" />
|
||||
</GeometryGroup>
|
||||
</WrapPanel.Resources>
|
||||
<antd:Icon Type="smile" Theme="Colorful" Foreground="#1890ff" />
|
||||
<antd:Icon Type="heart" Theme="Colorful" Foreground="#eb2f96" />
|
||||
<antd:Icon
|
||||
Foreground="#1890ff"
|
||||
Theme="Colorful"
|
||||
Type="smile" />
|
||||
<antd:Icon
|
||||
Foreground="#eb2f96"
|
||||
Theme="Colorful"
|
||||
Type="heart" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>\n
|
||||
\t<WrapPanel.Resources>\n
|
||||
\t\t<GeometryGroup x:Key="anticon.smile.colorful">\n
|
||||
\t\t\t<PathGeometry Figures="M 512 64 C 264.6 64 64 264.6 64 512 s 200.6 448 448 448 s 448 -200.6 448 -448 S 759.4 64 512 64 Z m 0 820 c -205.4 0 -372 -166.6 -372 -372 s 166.6 -372 372 -372 s 372 166.6 372 372 s -166.6 372 -372 372 ZM 288 421 a 48 48 0 1 0 96 0 a 48 48 0 1 0 -96 0 Z M 664 533 h -48.1 c -4.2 0 -7.8 3.2 -8.1 7.4 c -3.7 49.5 -45.3 88.6 -95.8 88.6 s -92 -39.1 -95.8 -88.6 c -0.3 -4.2 -3.9 -7.4 -8.1 -7.4 H 360 a 8 8 0 0 0 -8 8.4 c 4.4 84.3 74.5 151.6 160 151.6 s 155.6 -67.3 160 -151.6 a 8 8 0 0 0 -8 -8.4 Z M 640 421 a 48 48 0 1 0 96 0 a 48 48 0 1 0 -96 0 Z" />\n
|
||||
\t\t\t<PathGeometry Figures="M 512 140 c -205.4 0 -372 166.6 -372 372 s 166.6 372 372 372 s 372 -166.6 372 -372 s -166.6 -372 -372 -372 Z M 288 421 a 48.01 48.01 0 0 1 96 0 a 48.01 48.01 0 0 1 -96 0 Z m 224 272 c -85.5 0 -155.6 -67.3 -160 -151.6 a 8 8 0 0 1 8 -8.4 h 48.1 c 4.2 0 7.8 3.2 8.1 7.4 C 420 589.9 461.5 629 512 629 s 92.1 -39.1 95.8 -88.6 c 0.3 -4.2 3.9 -7.4 8.1 -7.4 H 664 a 8 8 0 0 1 8 8.4 C 667.6 625.7 597.5 693 512 693 Z m 176 -224 a 48.01 48.01 0 0 1 0 -96 a 48.01 48.01 0 0 1 0 96 Z" />\n
|
||||
\t</GeometryGroup>\n
|
||||
\t<GeometryGroup x:Key="anticon.heart.colorful">\n
|
||||
\t\t\t<PathGeometry Figures="M 923 283.6 a 260.04 260.04 0 0 0 -56.9 -82.8 a 264.4 264.4 0 0 0 -84 -55.5 A 265.34 265.34 0 0 0 679.7 125 c -49.3 0 -97.4 13.5 -139.2 39 c -10 6.1 -19.5 12.8 -28.5 20.1 c -9 -7.3 -18.5 -14 -28.5 -20.1 c -41.8 -25.5 -89.9 -39 -139.2 -39 c -35.5 0 -69.9 6.8 -102.4 20.3 c -31.4 13 -59.7 31.7 -84 55.5 a 258.44 258.44 0 0 0 -56.9 82.8 c -13.9 32.3 -21 66.6 -21 101.9 c 0 33.3 6.8 68 20.3 103.3 c 11.3 29.5 27.5 60.1 48.2 91 c 32.8 48.9 77.9 99.9 133.9 151.6 c 92.8 85.7 184.7 144.9 188.6 147.3 l 23.7 15.2 c 10.5 6.7 24 6.7 34.5 0 l 23.7 -15.2 c 3.9 -2.5 95.7 -61.6 188.6 -147.3 c 56 -51.7 101.1 -102.7 133.9 -151.6 c 20.7 -30.9 37 -61.5 48.2 -91 c 13.5 -35.3 20.3 -70 20.3 -103.3 c 0.1 -35.3 -7 -69.6 -20.9 -101.9 Z M 512 814.8 S 156 586.7 156 385.5 C 156 283.6 240.3 201 344.3 201 c 73.1 0 136.5 40.8 167.7 100.4 C 543.2 241.8 606.6 201 679.7 201 c 104 0 188.3 82.6 188.3 184.5 c 0 201.2 -356 429.3 -356 429.3 Z" />\n
|
||||
\t\t\t<PathGeometry Figures="M 679.7 201 c -73.1 0 -136.5 40.8 -167.7 100.4 C 480.8 241.8 417.4 201 344.3 201 c -104 0 -188.3 82.6 -188.3 184.5 c 0 201.2 356 429.3 356 429.3 s 356 -228.1 356 -429.3 C 868 283.6 783.7 201 679.7 201 Z" />\n
|
||||
\t\t</GeometryGroup>\n
|
||||
\t</WrapPanel.Resources>\n
|
||||
\t<antd:Icon Type="smile" Theme="Colorful" Foreground="#1890ff" />\n
|
||||
\t<antd:Icon Type="heart" Theme="Colorful" Foreground="#eb2f96" />\n
|
||||
\t<WrapPanel.Resources>\n
|
||||
\t\t<GeometryGroup x:Key="anticon.smile.colorful">\n
|
||||
\t\t\t<PathGeometry Figures="M 512 64 C 264.6 64 64 264.6 64 512 s 200.6 448 448 448 s 448 -200.6 448 -448 S 759.4 64 512 64 Z m 0 820 c -205.4 0 -372 -166.6 -372 -372 s 166.6 -372 372 -372 s 372 166.6 372 372 s -166.6 372 -372 372 ZM 288 421 a 48 48 0 1 0 96 0 a 48 48 0 1 0 -96 0 Z M 664 533 h -48.1 c -4.2 0 -7.8 3.2 -8.1 7.4 c -3.7 49.5 -45.3 88.6 -95.8 88.6 s -92 -39.1 -95.8 -88.6 c -0.3 -4.2 -3.9 -7.4 -8.1 -7.4 H 360 a 8 8 0 0 0 -8 8.4 c 4.4 84.3 74.5 151.6 160 151.6 s 155.6 -67.3 160 -151.6 a 8 8 0 0 0 -8 -8.4 Z M 640 421 a 48 48 0 1 0 96 0 a 48 48 0 1 0 -96 0 Z" />\n
|
||||
\t\t\t<PathGeometry Figures="M 512 140 c -205.4 0 -372 166.6 -372 372 s 166.6 372 372 372 s 372 -166.6 372 -372 s -166.6 -372 -372 -372 Z M 288 421 a 48.01 48.01 0 0 1 96 0 a 48.01 48.01 0 0 1 -96 0 Z m 224 272 c -85.5 0 -155.6 -67.3 -160 -151.6 a 8 8 0 0 1 8 -8.4 h 48.1 c 4.2 0 7.8 3.2 8.1 7.4 C 420 589.9 461.5 629 512 629 s 92.1 -39.1 95.8 -88.6 c 0.3 -4.2 3.9 -7.4 8.1 -7.4 H 664 a 8 8 0 0 1 8 8.4 C 667.6 625.7 597.5 693 512 693 Z m 176 -224 a 48.01 48.01 0 0 1 0 -96 a 48.01 48.01 0 0 1 0 96 Z" />\n
|
||||
\t</GeometryGroup>\n
|
||||
\t<GeometryGroup x:Key="anticon.heart.colorful">\n
|
||||
\t\t\t<PathGeometry Figures="M 923 283.6 a 260.04 260.04 0 0 0 -56.9 -82.8 a 264.4 264.4 0 0 0 -84 -55.5 A 265.34 265.34 0 0 0 679.7 125 c -49.3 0 -97.4 13.5 -139.2 39 c -10 6.1 -19.5 12.8 -28.5 20.1 c -9 -7.3 -18.5 -14 -28.5 -20.1 c -41.8 -25.5 -89.9 -39 -139.2 -39 c -35.5 0 -69.9 6.8 -102.4 20.3 c -31.4 13 -59.7 31.7 -84 55.5 a 258.44 258.44 0 0 0 -56.9 82.8 c -13.9 32.3 -21 66.6 -21 101.9 c 0 33.3 6.8 68 20.3 103.3 c 11.3 29.5 27.5 60.1 48.2 91 c 32.8 48.9 77.9 99.9 133.9 151.6 c 92.8 85.7 184.7 144.9 188.6 147.3 l 23.7 15.2 c 10.5 6.7 24 6.7 34.5 0 l 23.7 -15.2 c 3.9 -2.5 95.7 -61.6 188.6 -147.3 c 56 -51.7 101.1 -102.7 133.9 -151.6 c 20.7 -30.9 37 -61.5 48.2 -91 c 13.5 -35.3 20.3 -70 20.3 -103.3 c 0.1 -35.3 -7 -69.6 -20.9 -101.9 Z M 512 814.8 S 156 586.7 156 385.5 C 156 283.6 240.3 201 344.3 201 c 73.1 0 136.5 40.8 167.7 100.4 C 543.2 241.8 606.6 201 679.7 201 c 104 0 188.3 82.6 188.3 184.5 c 0 201.2 -356 429.3 -356 429.3 Z" />\n
|
||||
\t\t\t<PathGeometry Figures="M 679.7 201 c -73.1 0 -136.5 40.8 -167.7 100.4 C 480.8 241.8 417.4 201 344.3 201 c -104 0 -188.3 82.6 -188.3 184.5 c 0 201.2 356 429.3 356 429.3 s 356 -228.1 356 -429.3 C 868 283.6 783.7 201 679.7 201 Z" />\n
|
||||
\t\t</GeometryGroup>\n
|
||||
\t</WrapPanel.Resources>\n
|
||||
\t<antd:Icon Type="smile" Theme="Colorful" Foreground="#1890ff" />\n
|
||||
\t<antd:Icon Type="heart" Theme="Colorful" Foreground="#eb2f96" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
|
||||
@@ -1,43 +1,42 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.InputView"
|
||||
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">
|
||||
<UserControl
|
||||
mc:Ignorable="d"
|
||||
x:Class="AntDesignWPFDemo.Views.InputView"
|
||||
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:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Input" />
|
||||
<Label Content="Input" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="A basic widget for getting the user input is a text field. Keyboard and mouse can be used for providing or changing data." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="A user input in a form field is needed.
A search input is required." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<Style BasedOn="{StaticResource Ant.TextBox}" TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="0 16 16 0" />
|
||||
<Setter Property="Margin" Value="0,16,16,0" />
|
||||
</Style>
|
||||
<Style BasedOn="{StaticResource Ant.PasswordBox}" TargetType="PasswordBox">
|
||||
<Setter Property="Margin" Value="0 16 16 0" />
|
||||
<Setter Property="Margin" Value="0,16,16,0" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic usage">
|
||||
<antd:CodeBox.Description>
|
||||
Basic usage example.
|
||||
@@ -45,19 +44,22 @@
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<TextBox antd:Input.Placeholder="Basic usage" />
|
||||
<PasswordBox antd:Input.Placeholder="Basic usage" antd:Input.Eyeable="True" Password="666" />
|
||||
<PasswordBox
|
||||
Password="666"
|
||||
antd:Input.Eyeable="True"
|
||||
antd:Input.Placeholder="Basic usage" />
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\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.Attach="[Event Closing] = [Action Closing($source, $eventArgs)]">Prevent Default</antd:Tag>\n
|
||||
</WrapPanel>
|
||||
<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>
|
||||
<antd:CodeBox Title="Pre / Post tab">
|
||||
@@ -72,34 +74,42 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<antd:AntdBorder Grid.Column="0"
|
||||
UseLayoutRounding="True"
|
||||
CornerRadius="4 0 0 4"
|
||||
BorderThickness="1 1 0 1"
|
||||
BorderBrush="{DynamicResource InputBorderBrush}" Padding="11 0">
|
||||
<antd:AntBorder
|
||||
BorderBrush="{DynamicResource AntDesign.Brush.BorderPrimary}"
|
||||
BorderThickness="1,1,0,1"
|
||||
CornerRadius="4 0 0 4"
|
||||
Grid.Column="0"
|
||||
Padding="11,0"
|
||||
UseLayoutRounding="True">
|
||||
<TextBlock Text="http://" VerticalAlignment="Center" />
|
||||
</antd:AntdBorder>
|
||||
<TextBox Grid.Column="1" Text="mysite" Margin="0" antd:AntdControl.CornerRadius="0" />
|
||||
<antd:AntdBorder Grid.Column="2"
|
||||
UseLayoutRounding="True"
|
||||
CornerRadius="0 4 4 0"
|
||||
BorderThickness="0 1 1 1"
|
||||
BorderBrush="{DynamicResource InputBorderBrush}" Padding="11 0">
|
||||
</antd:AntBorder>
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Text="mysite"
|
||||
antd:AntControl.CornerRadius="0" />
|
||||
<antd:AntBorder
|
||||
BorderBrush="{DynamicResource AntDesign.Brush.BorderPrimary}"
|
||||
BorderThickness="0,1,1,1"
|
||||
CornerRadius="0 4 4 0"
|
||||
Grid.Column="2"
|
||||
Padding="11,0"
|
||||
UseLayoutRounding="True">
|
||||
<TextBlock Text=".com" VerticalAlignment="Center" />
|
||||
</antd:AntdBorder>
|
||||
</antd:AntBorder>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\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.Attach="[Event Closing] = [Action Closing($source, $eventArgs)]">Prevent Default</antd:Tag>\n
|
||||
</WrapPanel>
|
||||
<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>
|
||||
<antd:CodeBox Title="Search box">
|
||||
@@ -108,33 +118,45 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<TextBox antd:Input.Placeholder="input search text" antd:Input.Clearable="True">
|
||||
<TextBox antd:Input.Clearable="True" antd:Input.Placeholder="input search text">
|
||||
<antd:Input.Suffix>
|
||||
<antd:Icon Type="search" />
|
||||
</antd:Input.Suffix>
|
||||
</TextBox>
|
||||
<TextBox antd:Input.Placeholder="input search text" Padding="12 0 0 0">
|
||||
<TextBox Padding="12,0,0,0" antd:Input.Placeholder="input search text">
|
||||
<antd:Input.Suffix>
|
||||
<antd:AntButton Margin="8 -1 -2 -1" Type="Primary" Content="Search" antd:AntdControl.CornerRadius="0 4 4 0" />
|
||||
<antd:AntButton
|
||||
Content="Search"
|
||||
Margin="8,-1,-2,-1"
|
||||
Variant="Solid"
|
||||
antd:AntControl.CornerRadius="0 4 4 0" />
|
||||
</antd:Input.Suffix>
|
||||
</TextBox>
|
||||
<TextBox antd:Input.Placeholder="input search text" antd:AntdControl.Size="Large" Padding="12 0 0 0">
|
||||
<TextBox
|
||||
Padding="12,0,0,0"
|
||||
antd:AntControl.Size="Large"
|
||||
antd:Input.Placeholder="input search text">
|
||||
<antd:Input.Suffix>
|
||||
<antd:AntButton Type="Primary" Size="Large" Margin="8 -1 -2 -1" Content="Search" antd:AntdControl.CornerRadius="0 4 4 0" />
|
||||
<antd:AntButton
|
||||
Content="Search"
|
||||
Margin="8,-1,-2,-1"
|
||||
Size="Large"
|
||||
Variant="Solid"
|
||||
antd:AntControl.CornerRadius="0 4 4 0" />
|
||||
</antd:Input.Suffix>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\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.Attach="[Event Closing] = [Action Closing($source, $eventArgs)]">Prevent Default</antd:Tag>\n
|
||||
</WrapPanel>
|
||||
<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>
|
||||
<antd:CodeBox Title="Prefix and Suffix">
|
||||
@@ -144,50 +166,50 @@
|
||||
<antd:CodeBox.Content>
|
||||
<TextBox antd:Input.Placeholder="Enter your username">
|
||||
<antd:Input.Prefix>
|
||||
<antd:Icon Type="user" Foreground="#3F000000" />
|
||||
<antd:Icon Foreground="#3F000000" Type="user" />
|
||||
</antd:Input.Prefix>
|
||||
<antd:Input.Suffix>
|
||||
<antd:Icon Type="close" Foreground="#3F000000" />
|
||||
<antd:Icon Foreground="#3F000000" Type="close" />
|
||||
</antd:Input.Suffix>
|
||||
</TextBox>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<TextBox antd:Input.Placeholder="Enter your username">\n
|
||||
\t<antd:Input.Prefix>\n
|
||||
\t\t<antd:Icon Type="user" Foreground="#3F000000" />\n
|
||||
\t</antd:Input.Prefix>\n
|
||||
\t<antd:Input.Suffix>\n
|
||||
\t\t<antd:Icon Type="close" Foreground="#3F000000" />\n
|
||||
\t</antd:Input.Suffix>\n
|
||||
</TextBox>
|
||||
<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
|
||||
<TextBox antd:Input.Placeholder="Enter your username">\n
|
||||
\t<antd:Input.Prefix>\n
|
||||
\t\t<antd:Icon Type="user" Foreground="#3F000000" />\n
|
||||
\t</antd:Input.Prefix>\n
|
||||
\t<antd:Input.Suffix>\n
|
||||
\t\t<antd:Icon Type="close" Foreground="#3F000000" />\n
|
||||
\t</antd:Input.Suffix>\n
|
||||
</TextBox>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Three sizes of Input">
|
||||
<antd:CodeBox.Description>
|
||||
There are three sizes of an Input box: `Large` (40px)、`Default` (32px) and `Small` (24px).
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<TextBox antd:Input.Placeholder="large size" antd:AntdControl.Size="Large" />
|
||||
<TextBox antd:AntControl.Size="Large" antd:Input.Placeholder="large size" />
|
||||
<TextBox antd:Input.Placeholder="default size" />
|
||||
<TextBox antd:Input.Placeholder="small size" antd:AntdControl.Size="Small" />
|
||||
<TextBox antd:AntControl.Size="Small" antd:Input.Placeholder="small size" />
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\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.Attach="[Event Closing] = [Action Closing($source, $eventArgs)]">Prevent Default</antd:Tag>\n
|
||||
</WrapPanel>
|
||||
<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>
|
||||
|
||||
23
AntdWpfDemo/Views/NotificationView.xaml
Normal file
23
AntdWpfDemo/Views/NotificationView.xaml
Normal file
@@ -0,0 +1,23 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.NotificationView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:AntdWpfDemo.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Button x:Name="SuccessClick" Content="Success" Margin="5" Padding="10"/>
|
||||
<Button x:Name="InfoClick" Content="Info" Margin="5" Padding="10" />
|
||||
<Button x:Name="WarningClick" Content="Warning (BottomLeft)" Margin="5" Padding="10" />
|
||||
<Button x:Name="ErrorClick" Content="Error (TopLeft)" Margin="5" Padding="10" />
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Button x:Name="thisSuccessClick" Content="Success" Margin="5" Padding="10"/>
|
||||
<Button x:Name="thisInfoClick" Content="Info" Margin="5" Padding="10" />
|
||||
<Button x:Name="thisWarningClick" Content="Warning (BottomLeft)" Margin="5" Padding="10" />
|
||||
<Button x:Name="thisErrorClick" Content="Error (TopLeft)" Margin="5" Padding="10" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
30
AntdWpfDemo/Views/NotificationView.xaml.cs
Normal file
30
AntdWpfDemo/Views/NotificationView.xaml.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
|
||||
namespace AntdWpfDemo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// NotificationView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class NotificationView : UserControl
|
||||
{
|
||||
public NotificationView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.ProgressView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930">
|
||||
<UserControl
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930"
|
||||
mc:Ignorable="d"
|
||||
x:Class="AntDesignWPFDemo.Views.ProgressView"
|
||||
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:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
@@ -27,37 +28,44 @@
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="antd:AntButton">
|
||||
<Setter Property="Margin" Value="8 0 0 8" />
|
||||
<Setter Property="Margin" Value="8,0,0,8" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Arrow pointing at the center">
|
||||
<antd:CodeBox.Description>进度条</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel Height="180">
|
||||
<Slider x:Name="Slider"
|
||||
Margin="0,0,0,10"
|
||||
Maximum="100"
|
||||
Minimum="0" />
|
||||
<Slider
|
||||
Margin="0,0,0,10"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
x:Name="Slider" />
|
||||
<ProgressBar Margin="0,0,0,10" Value="{Binding ElementName=Slider, Path=Value}" />
|
||||
<ProgressBar Margin="0,0,0,10" IsIndeterminate="True" />
|
||||
<!--<ProgressBar Margin="0,0,0,10" Value="{Binding ElementName=Slider, Path=Value}" />-->
|
||||
<!--<ProgressBar IsIndeterminate="True" Margin="0,0,0,10" Value="{Binding ElementName=Slider, Path=Value}" />-->
|
||||
<ProgressBar IsIndeterminate="True" Margin="0,0,0,10" />
|
||||
<UniformGrid>
|
||||
<ProgressBar MaxWidth="80"
|
||||
Value="{Binding ElementName=Slider, Path=Value}"
|
||||
Style="{StaticResource Ant.CircularProgressBar}" />
|
||||
<ProgressBar MaxWidth="80"
|
||||
IsIndeterminate="True"
|
||||
Style="{StaticResource Ant.CircularProgressBar}" />
|
||||
<ProgressBar
|
||||
Style="{StaticResource Ant.CircularProgressBar}"
|
||||
Width="100"
|
||||
Value="{Binding ElementName=Slider, Path=Value}" />
|
||||
<ProgressBar
|
||||
Width="100"
|
||||
IsIndeterminate="True"
|
||||
Style="{StaticResource Ant.CircularProgressBar}" />
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code><ProgressBar Value="30" Margin="0,0,0,10"/>\n\n
|
||||
<antd:CodeBox.Code>
|
||||
<ProgressBar Value="30" Margin="0,0,0,10"/>\n\n
|
||||
<ProgressBar IsIndeterminate="True" Margin="0,0,0,10"/>\n\n
|
||||
<ProgressBar MaxWidth="100" Value="50" Style="{StaticResource Ant.CircularProgressBar}"/></antd:CodeBox.Code>
|
||||
<ProgressBar MaxWidth="100" Value="50" Style="{StaticResource Ant.CircularProgressBar}"/>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
@@ -1,105 +1,100 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.RadioButtonView"
|
||||
<UserControl x:Class="AntDesignWPFDemo.Views.RadioButtonView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
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:antd="https://github.com/ShrlAlgo/AntdWpf"
|
||||
xmlns:viewmodels="clr-namespace:AntDesignWPFDemo.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodels:RadioButtonViewModel}"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Radio" />
|
||||
<Label Content="Radio" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Radio." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<TextBlock Style="{StaticResource Ant.P}"
|
||||
TextWrapping="Wrap"
|
||||
Text="Used to select a single state in multiple options.
The difference between Select is that Radio is visible to user and can facilitate the comparison of choice, which makes there shouldn't be too many of them." />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}"
|
||||
Text="Used to select a single state in multiple options.
The difference between Select is that Radio is visible to user and can facilitate the comparison of choice, which makes there shouldn't be too many of them."
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
The simplest use.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>The simplest use.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<RadioButton Content="Radio" />
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
||||
<RadioButton Content="Radio" />
|
||||
</antd:CodeBox.Code>
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Styles/antd.xaml" />\n\n
|
||||
<RadioButton Content="Radio" /></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
<antd:CodeBox Title="Radio Group">
|
||||
<antd:CodeBox.Description>
|
||||
A group of radio components.
|
||||
</antd:CodeBox.Description>
|
||||
<!--<antd:CodeBox.Content>
|
||||
<antd:CodeBox.Description>A group of radio components.</antd:CodeBox.Description>
|
||||
<!-- <antd:CodeBox.Content>
|
||||
<antd:RadioButtonGroup Orientation="Vertical">
|
||||
<RadioButton Content="A" />
|
||||
<RadioButton Content="B" GroupName="A" />
|
||||
<RadioButton Content="C" GroupName="A" />
|
||||
<RadioButton Content="D" />
|
||||
</antd:RadioButtonGroup>
|
||||
</antd:CodeBox.Content>-->
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
||||
<RadioButton Content="Radio" />
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox.Content> -->
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Styles/antd.xaml" />\n\n
|
||||
<RadioButton Content="Radio" /></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
<antd:CodeBox Title="RadioGroup group - ItemsSource">
|
||||
<antd:CodeBox.Description>
|
||||
Render radios by configuring `ItemsSource`.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>Render radios by configuring `ItemsSource`.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<antd:RadioButtonGroup ItemsSource="{Binding Items}" DisplayMemberPath="Label" Orientation="Vertical" />
|
||||
<antd:RadioButtonGroup DisplayMemberPath="Label"
|
||||
ItemsSource="{Binding Items}"
|
||||
Orientation="Vertical" />
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
||||
<RadioButton Content="Radio" />
|
||||
</antd:CodeBox.Code>
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Styles/antd.xaml" />\n\n
|
||||
<RadioButton Content="Radio" /></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Disabled">
|
||||
<antd:CodeBox.Description>
|
||||
Radio unavailable.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>Radio unavailable.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" Margin="0 0 0 8" />
|
||||
<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" IsChecked="True" />
|
||||
<antd:AntButton x:Name="Toggle" Type="Primary" Content="Toggle disabled" Margin="0 20 0 0" />
|
||||
<RadioButton Margin="0,0,0,8"
|
||||
Content="Radio"
|
||||
IsEnabled="{Binding IsEnabled}" />
|
||||
<RadioButton Content="Radio"
|
||||
IsChecked="True"
|
||||
IsEnabled="{Binding IsEnabled}" />
|
||||
<antd:AntButton x:Name="Toggle"
|
||||
Margin="0,20,0,0"
|
||||
Content="Toggle disabled"
|
||||
Variant="Solid" />
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
||||
<StackPanel>\n
|
||||
\t<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" Margin="0 0 0 8" />\n
|
||||
\t<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" IsChecked="True" />\n
|
||||
\t<antd:Button x:Name="Toggle" Type="Primary" Content="Toggle disabled" Margin="0 20 0 0" />\n
|
||||
</StackPanel>\n
|
||||
</antd:CodeBox.Code>
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Styles/antd.xaml" />\n\n
|
||||
<StackPanel>\n
|
||||
\t<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" Margin="0 0 0 8" />\n
|
||||
\t<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" IsChecked="True" />\n
|
||||
\t<antd:Button x:Name="Toggle" Type="Primary" Content="Toggle disabled" Margin="0 20 0 0" />\n
|
||||
</StackPanel>\n</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -1,45 +1,45 @@
|
||||
<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">
|
||||
<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 Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Select" />
|
||||
<Label Content="Select" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Select component to select value from options." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<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 Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<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" />
|
||||
<Setter Property="Margin" Value="0,0,8,10" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic usage">
|
||||
<antd:CodeBox.Description>
|
||||
Basic usage example.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>Basic usage example.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<ComboBox antd:Input.Placeholder="Basic usage">
|
||||
@@ -48,7 +48,7 @@
|
||||
<ComboBoxItem IsEnabled="False">Disabled</ComboBoxItem>
|
||||
<ComboBoxItem>yiminghe</ComboBoxItem>
|
||||
</ComboBox>
|
||||
<ComboBox antd:Input.Placeholder="Basic usage" IsEnabled="False">
|
||||
<ComboBox IsEnabled="False" antd:Input.Placeholder="Basic usage">
|
||||
<ComboBoxItem>Jack</ComboBoxItem>
|
||||
<ComboBoxItem IsSelected="True">Luck</ComboBoxItem>
|
||||
<ComboBoxItem IsEnabled="False">Disabled</ComboBoxItem>
|
||||
@@ -57,21 +57,20 @@
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\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.Attach="[Event Closing] = [Action Closing($source, $eventArgs)]">Prevent Default</antd:Tag>\n
|
||||
</WrapPanel>
|
||||
<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">
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8,0" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -1,40 +1,67 @@
|
||||
<antd:AntdWindow x:Class="AntdWpfDemo.Views.ShellView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="using:AntdWpfDemo.Views"
|
||||
xmlns:views="clr-namespace:AntdWpfDemo.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Width="930"
|
||||
Height="600"
|
||||
mc:Ignorable="d">
|
||||
<!--<antd:Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<antd:AntWindow x:Class="AntDesignWPFDemo.Views.ShellView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="using:AntDesignWPFDemo.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:views="clr-namespace:AntDesignWPFDemo.Views"
|
||||
Width="930"
|
||||
Height="600"
|
||||
mc:Ignorable="d">
|
||||
<antd:AntWindow.Resources>
|
||||
<ObjectDataProvider x:Key="DockEnumValues"
|
||||
MethodName="GetValues"
|
||||
ObjectType="{x:Type sys:Enum}">
|
||||
<ObjectDataProvider.MethodParameters>
|
||||
<x:Type TypeName="Dock" />
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
<!-- ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Controls.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Controls.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/AntIcons.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</antd:Window.Resources>-->
|
||||
<TabControl x:Name="Items" TabStripPlacement="Top" >
|
||||
<!--<TabItem Header="Tab1" >
|
||||
<StackPanel >
|
||||
<views:AlertView/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="Tab2" />
|
||||
<TabItem Header="Tab3" />-->
|
||||
</TabControl>
|
||||
</ResourceDictionary> -->
|
||||
</antd:AntWindow.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Margin="5"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center" Content="标签对齐:" />
|
||||
<ComboBox x:Name="AlignmentComboBox"
|
||||
Width="120"
|
||||
ItemsSource="{Binding Source={StaticResource DockEnumValues}}" />
|
||||
</StackPanel>
|
||||
<!-- antd:TabControlHelper.IsEditable="True"
|
||||
antd:TabControlHelper.TabType="Card" -->
|
||||
<TabControl Grid.Row="1" x:Name="Items" TabStripPlacement="{Binding ElementName=AlignmentComboBox, Path=SelectedItem}">
|
||||
<!-- <TabItem Header="Tab1" >
|
||||
<StackPanel >
|
||||
<views:AlertView/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="Tab2" />
|
||||
<TabItem Header="Tab3" /> -->
|
||||
</TabControl>
|
||||
</Grid>
|
||||
|
||||
<!--<StackPanel>
|
||||
--><!--<TabControl TabStripPlacement="Left">
|
||||
<!-- <StackPanel>
|
||||
|
||||
<TabControl TabStripPlacement="Left">
|
||||
<TabItem Header="Tab1" />
|
||||
<TabItem Header="Tab2" />
|
||||
<TabItem Header="Tab3" />
|
||||
</TabControl>-->
|
||||
<!--<antd:Alert Type="Success" Description="描述"/>
|
||||
<antd:Button Content="Button"/>--><!--
|
||||
</StackPanel>-->
|
||||
</antd:AntdWindow>
|
||||
</TabControl>
|
||||
<antd:Alert Type="Success" Description="描述"/>
|
||||
<antd:Button Content="Button"/>
|
||||
|
||||
</StackPanel> -->
|
||||
</antd:AntWindow>
|
||||
@@ -1,35 +1,36 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.SpinView"
|
||||
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">
|
||||
<UserControl
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930"
|
||||
mc:Ignorable="d"
|
||||
x:Class="AntDesignWPFDemo.Views.SpinView"
|
||||
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:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Spin" />
|
||||
<Label Content="Spin" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="A spinner for displaying loading state of a page or a section." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="When part of the page is waiting for asynchronous data or during a rendering process, an appropriate loading animation can effectively alleviate users' inquietude." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
A simple loading status.
|
||||
@@ -40,10 +41,10 @@
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>\n
|
||||
\t<antd:Spin />\n
|
||||
\t<antd:Spin />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -54,17 +55,17 @@
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Spin Tip="Loading...">
|
||||
<antd:Alert Message="Alert message title" Description="Further details about the context of this alert." />
|
||||
<antd:Alert Description="Further details about the context of this alert." Message="Alert message title" />
|
||||
</antd:Spin>
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>\n
|
||||
\t<antd:Spin Tip="Loading...">\n
|
||||
\t\t<antd:Alert Message="Alert message title" Description="Further details about the context of this alert." />\n
|
||||
\t</antd:Spin>\n
|
||||
\t<antd:Spin Tip="Loading...">\n
|
||||
\t\t<antd:Alert Message="Alert message title" Description="Further details about the context of this alert." />\n
|
||||
\t</antd:Spin>\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -76,43 +77,43 @@
|
||||
<WrapPanel>
|
||||
<antd:Spin>
|
||||
<antd:Spin.Indicator>
|
||||
<antd:Icon Type="loading" FontSize="24" />
|
||||
<antd:Icon FontSize="24" Type="loading" />
|
||||
</antd:Spin.Indicator>
|
||||
</antd:Spin>
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>\n
|
||||
\t<antd:Spin>\n
|
||||
\t\t<antd:Spin.Indicator>\n
|
||||
\t\t\t<antd:Icon Type="loading" FontSize="24" />\n
|
||||
\t\t</antd:Spin.Indicator>\n
|
||||
\t</antd:Spin>\n
|
||||
\t<antd:Spin>\n
|
||||
\t\t<antd:Spin.Indicator>\n
|
||||
\t\t\t<antd:Icon Type="loading" FontSize="24" />\n
|
||||
\t\t</antd:Spin.Indicator>\n
|
||||
\t</antd:Spin>\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Size">
|
||||
<antd:CodeBox.Description>
|
||||
A small `Spin` use in loading text, default `Spin` use in loading card-level block, and large `Spin` use in loading page.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<antd:Spin Size="Small" Margin="0 0 16 16" />
|
||||
<antd:Spin Margin="0 0 16 16" />
|
||||
<antd:Spin Size="Large" Margin="0 0 16 16" />
|
||||
<antd:Spin Margin="0,0,16,16" Size="Small" />
|
||||
<antd:Spin Margin="0,0,16,16" />
|
||||
<antd:Spin Margin="0,0,16,16" Size="Large" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>\n
|
||||
\t<antd:Spin Size="Small" Margin="0 0 16 16" />\n
|
||||
\t<antd:Spin Margin="0 0 16 16" />\n
|
||||
\t<antd:Spin Size="Large" Margin="0 0 16 16" />\n
|
||||
\t<antd:Spin Size="Small" Margin="0 0 16 16" />\n
|
||||
\t<antd:Spin Margin="0 0 16 16" />\n
|
||||
\t<antd:Spin Size="Large" Margin="0 0 16 16" />\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -124,28 +125,28 @@
|
||||
<StackPanel>
|
||||
<WrapPanel>
|
||||
<antd:Spin Spinning="{Binding IsChecked, Mode=OneWay, ElementName=SwitchOne}">
|
||||
<antd:Alert Message="Alert message title" Description="Further details about the context of this alert." />
|
||||
<antd:Alert Description="Further details about the context of this alert." Message="Alert message title" />
|
||||
</antd:Spin>
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="0 16 0 0">
|
||||
<WrapPanel Margin="0,16,0,0">
|
||||
<Label Content="Loading state:" />
|
||||
<antd:Switch x:Name="SwitchOne" IsChecked="True" />
|
||||
<antd:Switch IsChecked="True" x:Name="SwitchOne" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Spin Spinning="{Binding IsChecked, Mode=OneWay, ElementName=SwitchOne}">\n
|
||||
\t\t\t<antd:Alert Message="Alert message title" Description="Further details about the context of this alert." />\n
|
||||
\t\t</antd:Spin>\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 16 0 0">\n
|
||||
\t\t<Label Content="Loading state:" />\n
|
||||
\t\t<antd:Switch x:Name="SwitchOne" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Spin Spinning="{Binding IsChecked, Mode=OneWay, ElementName=SwitchOne}">\n
|
||||
\t\t\t<antd:Alert Message="Alert message title" Description="Further details about the context of this alert." />\n
|
||||
\t\t</antd:Spin>\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 16 0 0">\n
|
||||
\t\t<Label Content="Loading state:" />\n
|
||||
\t\t<antd:Switch x:Name="SwitchOne" />\n
|
||||
\t</WrapPanel>\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.SwitchView"
|
||||
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">
|
||||
<UserControl
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930"
|
||||
mc:Ignorable="d"
|
||||
x:Class="AntDesignWPFDemo.Views.SwitchView"
|
||||
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:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Switch" />
|
||||
<Label Content="Switch" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Switching Selector." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="If you need to represent the switching between two states or on-off state.
The difference between Switch and Checkbox is that Switch will trigger a state change directly when you toggle it, while Checkbox is generally used for state marking, which should work in conjunction with submit operation." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
The most basic usage.
|
||||
@@ -41,10 +41,10 @@
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -54,60 +54,65 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<WrapPanel Margin="8 8 0 0">
|
||||
<antd:Switch IsChecked="True" Content="开" UnCheckedContent="关" />
|
||||
<WrapPanel Margin="8,8,0,0">
|
||||
<antd:Switch
|
||||
Content="开"
|
||||
IsChecked="True"
|
||||
UnCheckedContent="关" />
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="8 8 0 0">
|
||||
<WrapPanel Margin="8,8,0,0">
|
||||
<antd:Switch Content="1" UnCheckedContent="0" />
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="8 8 0 8">
|
||||
<WrapPanel Margin="8,8,0,8">
|
||||
<antd:Switch IsChecked="True">
|
||||
<antd:Switch.Content>
|
||||
<Path Width="12"
|
||||
Height="12"
|
||||
Stretch="Uniform"
|
||||
Fill="White"
|
||||
Data="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" />
|
||||
<Path
|
||||
Data="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"
|
||||
Fill="White"
|
||||
Height="12"
|
||||
Stretch="Uniform"
|
||||
Width="12" />
|
||||
</antd:Switch.Content>
|
||||
<antd:Switch.UnCheckedContent>
|
||||
<Path Width="9"
|
||||
Height="9"
|
||||
Stretch="Uniform"
|
||||
Fill="White"
|
||||
Data="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" />
|
||||
<Path
|
||||
Data="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"
|
||||
Fill="White"
|
||||
Height="9"
|
||||
Stretch="Uniform"
|
||||
Width="9" />
|
||||
</antd:Switch.UnCheckedContent>
|
||||
</antd:Switch>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Switch IsChecked="True" Content="开" UnCheckedContent="关" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Switch IsChecked="True" Content="1" UnCheckedContent="0" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Switch IsChecked="True">\n
|
||||
\t\t\t<antd:Switch.Content>\n
|
||||
\t\t\t\t<Path Width="12" \n
|
||||
\t\t\t\t\tHeight="12" \n
|
||||
\t\t\t\t\tStretch="Uniform" \n
|
||||
\t\t\t\t\tFill="White" \n
|
||||
\t\t\t\t\tData="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" />\n
|
||||
\t\t\t</antd:Switch.Content>\n
|
||||
\t\t\t<antd:Switch.UnCheckedContent>\n
|
||||
\t\t\t\t<Path Width="9" \n
|
||||
\t\t\t\t\tHeight="9"\n
|
||||
\t\t\t\t\tStretch="Uniform" \n
|
||||
\t\t\t\t\tFill="White" \n
|
||||
\t\t\t\t\tData="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" />\n
|
||||
\t\t\t</antd:Switch.UnCheckedContent>\n
|
||||
\t\t</antd:Switch>\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Switch IsChecked="True" Content="开" UnCheckedContent="关" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Switch IsChecked="True" Content="1" UnCheckedContent="0" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Switch IsChecked="True">\n
|
||||
\t\t\t<antd:Switch.Content>\n
|
||||
\t\t\t\t<Path Width="12" \n
|
||||
\t\t\t\t\tHeight="12" \n
|
||||
\t\t\t\t\tStretch="Uniform" \n
|
||||
\t\t\t\t\tFill="White" \n
|
||||
\t\t\t\t\tData="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" />\n
|
||||
\t\t\t</antd:Switch.Content>\n
|
||||
\t\t\t<antd:Switch.UnCheckedContent>\n
|
||||
\t\t\t\t<Path Width="9" \n
|
||||
\t\t\t\t\tHeight="9"\n
|
||||
\t\t\t\t\tStretch="Uniform" \n
|
||||
\t\t\t\t\tFill="White" \n
|
||||
\t\t\t\t\tData="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" />\n
|
||||
\t\t\t</antd:Switch.UnCheckedContent>\n
|
||||
\t\t</antd:Switch>\n
|
||||
\t</WrapPanel>\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -120,26 +125,26 @@
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" Loading="True" />
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="0 8 0 0">
|
||||
<antd:Switch Size="Small" Loading="True" />
|
||||
<WrapPanel Margin="0,8,0,0">
|
||||
<antd:Switch Loading="True" Size="Small" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Switch IsChecked="True" Loading="True" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Switch Size="Small" Loading="True" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Switch IsChecked="True" Loading="True" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Switch Size="Small" Loading="True" />\n
|
||||
\t</WrapPanel>\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Disabled">
|
||||
<antd:CodeBox.Description>
|
||||
Disabled state of `Switch`.
|
||||
@@ -149,21 +154,24 @@
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" IsEnabled="{Binding IsEnabled}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="0 8 0 0">
|
||||
<antd:AntButton x:Name="Toggle" Type="Primary" Content="Toggle disabled" />
|
||||
<WrapPanel Margin="0,8,0,0">
|
||||
<antd:AntButton
|
||||
Content="Toggle disabled"
|
||||
Variant="Solid"
|
||||
x:Name="Toggle" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<StackPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Switch IsChecked="True" IsEnabled="{Binding IsEnabled}" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Button x:Name="Toggle" Type="Primary" Content="Toggle disabled" />\n
|
||||
\t</WrapPanel>\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Switch IsChecked="True" IsEnabled="{Binding IsEnabled}" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Button x:Name="Toggle" Type="Primary" Content="Toggle disabled" />\n
|
||||
\t</WrapPanel>\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -176,21 +184,21 @@
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" />
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="0 8 0 0">
|
||||
<antd:Switch Size="Small" IsChecked="True" />
|
||||
<WrapPanel Margin="0,8,0,0">
|
||||
<antd:Switch IsChecked="True" Size="Small" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<StackPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Switch IsChecked="True" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Switch Size="Small" IsChecked="True" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Switch IsChecked="True" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel Margin="0 8 0 0">\n
|
||||
\t\t<antd:Switch Size="Small" IsChecked="True" />\n
|
||||
\t</WrapPanel>\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
|
||||
@@ -1,41 +1,42 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.TagView"
|
||||
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:cal="http://www.caliburnproject.org"
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930">
|
||||
<UserControl
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930"
|
||||
mc:Ignorable="d"
|
||||
x:Class="AntDesignWPFDemo.Views.TagView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Tag" />
|
||||
<Label Content="Tag" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="Tag for categorizing or markup." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="It can be used to tag by dimension or property.
When categorizing." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="antd:Tag">
|
||||
<Setter Property="Margin" Value="0 0 8 8" />
|
||||
<Setter Property="Margin" Value="0,0,8,8" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
Usage of basic Tag, and it could be closable by set `Closable` property. Closable Tag support `Closed` event.
|
||||
@@ -49,14 +50,14 @@
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<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.Attach="[Event Closing] = [Action Closing($source, $eventArgs)]">Prevent Default</antd:Tag>\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>
|
||||
@@ -66,7 +67,11 @@
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<WrapPanel>
|
||||
<TextBlock Text="Categories:" FontSize="10" VerticalAlignment="Center" Margin="0 0 8 0" />
|
||||
<TextBlock
|
||||
FontSize="10"
|
||||
Margin="0,0,8,0"
|
||||
Text="Categories:"
|
||||
VerticalAlignment="Center" />
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<antd:CheckableTag Content="Movies" />
|
||||
<antd:CheckableTag Content="Books" />
|
||||
@@ -76,75 +81,119 @@
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<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<TextBlock Text="Categories:" FontSize="10" VerticalAlignment="Center" Margin="0 0 8 0" />\n
|
||||
\t<WrapPanel VerticalAlignment="Center">\n
|
||||
\t\t<antd:CheckableTag Content="Movies" />\n
|
||||
\t\t<antd:CheckableTag Content="Books" />\n
|
||||
\t\t<antd:CheckableTag Content="Music" />\n
|
||||
\t\t<antd:CheckableTag Content="Sports" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<TextBlock Text="Categories:" FontSize="10" VerticalAlignment="Center" Margin="0 0 8 0" />\n
|
||||
\t<WrapPanel VerticalAlignment="Center">\n
|
||||
\t\t<antd:CheckableTag Content="Movies" />\n
|
||||
\t\t<antd:CheckableTag Content="Books" />\n
|
||||
\t\t<antd:CheckableTag Content="Music" />\n
|
||||
\t\t<antd:CheckableTag Content="Sports" />\n
|
||||
\t</WrapPanel>\n
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Colorful Tag">
|
||||
<antd:CodeBox.Description>
|
||||
Colorful Tag can be easily implemented by setting the `ColorMode` property.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H4}" Content="Colorful:" />
|
||||
<Label Content="Colorful:" Style="{StaticResource Ant.H4}" />
|
||||
<WrapPanel>
|
||||
<antd:Tag Foreground="#EB2F96" Content="magenta" ColorMode="Colorful" Closable="True" />
|
||||
<antd:Tag Foreground="#F5222D" Content="red" ColorMode="Colorful" />
|
||||
<antd:Tag Foreground="#FA541C" Content="volcano" ColorMode="Colorful" />
|
||||
<antd:Tag Foreground="#FA8C16" Content="orange" ColorMode="Colorful" />
|
||||
<antd:Tag Foreground="#FAAD14" Content="Gold" ColorMode="Colorful" />
|
||||
<antd:Tag Foreground="#A0D911" Content="lime" ColorMode="Colorful" />
|
||||
<antd:Tag Foreground="#52C41A" Content="green" ColorMode="Colorful" />
|
||||
<antd:Tag Foreground="#13C2C2" Content="cyan" ColorMode="Colorful" />
|
||||
<antd:Tag Foreground="#1890FF" Content="blue" ColorMode="Colorful" />
|
||||
<antd:Tag Foreground="#2F54EB" Content="purple" ColorMode="Colorful" />
|
||||
<antd:Tag
|
||||
Closable="True"
|
||||
ColorMode="Colorful"
|
||||
Content="magenta"
|
||||
Foreground="#EB2F96" />
|
||||
<antd:Tag
|
||||
ColorMode="Colorful"
|
||||
Content="red"
|
||||
Foreground="#F5222D" />
|
||||
<antd:Tag
|
||||
ColorMode="Colorful"
|
||||
Content="volcano"
|
||||
Foreground="#FA541C" />
|
||||
<antd:Tag
|
||||
ColorMode="Colorful"
|
||||
Content="orange"
|
||||
Foreground="#FA8C16" />
|
||||
<antd:Tag
|
||||
ColorMode="Colorful"
|
||||
Content="Gold"
|
||||
Foreground="#FAAD14" />
|
||||
<antd:Tag
|
||||
ColorMode="Colorful"
|
||||
Content="lime"
|
||||
Foreground="#A0D911" />
|
||||
<antd:Tag
|
||||
ColorMode="Colorful"
|
||||
Content="green"
|
||||
Foreground="#52C41A" />
|
||||
<antd:Tag
|
||||
ColorMode="Colorful"
|
||||
Content="cyan"
|
||||
Foreground="#13C2C2" />
|
||||
<antd:Tag
|
||||
ColorMode="Colorful"
|
||||
Content="blue"
|
||||
Foreground="#1890FF" />
|
||||
<antd:Tag
|
||||
ColorMode="Colorful"
|
||||
Content="purple"
|
||||
Foreground="#2F54EB" />
|
||||
</WrapPanel>
|
||||
<Label Style="{StaticResource Ant.H4}" Content="Inverse:" />
|
||||
<Label Content="Inverse:" Style="{StaticResource Ant.H4}" />
|
||||
<WrapPanel>
|
||||
<antd:Tag Background="#FF5500" Content="#FF5500" ColorMode="Inverse" Closable="True" />
|
||||
<antd:Tag Background="#2DB7F5" Content="#2DB7F5" ColorMode="Inverse" />
|
||||
<antd:Tag Background="#87d068" Content="#87d068" ColorMode="Inverse" />
|
||||
<antd:Tag Background="#108EE9" Content="#108EE9" ColorMode="Inverse" />
|
||||
<antd:Tag
|
||||
Background="#FF5500"
|
||||
Closable="True"
|
||||
ColorMode="Inverse"
|
||||
Content="#FF5500" />
|
||||
<antd:Tag
|
||||
Background="#2DB7F5"
|
||||
ColorMode="Inverse"
|
||||
Content="#2DB7F5" />
|
||||
<antd:Tag
|
||||
Background="#87d068"
|
||||
ColorMode="Inverse"
|
||||
Content="#87d068" />
|
||||
<antd:Tag
|
||||
Background="#108EE9"
|
||||
ColorMode="Inverse"
|
||||
Content="#108EE9" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<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
|
||||
<StackPanel>\n
|
||||
\t<Label Style="{StaticResource Ant.H4}" Content="Colorful:" />\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Tag Foreground="#EB2F96" Content="magenta" ColorMode="Colorful" Closable="True" />\n
|
||||
\t\t<antd:Tag Foreground="#F5222D" Content="red" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#FA541C" Content="volcano" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#FA8C16" Content="orange" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#FAAD14" Content="Gold" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#A0D911" Content="lime" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#52C41A" Content="green" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#13C2C2" Content="cyan" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#1890FF" Content="blue" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#2F54EB" Content="purple" ColorMode="Colorful" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<Label Style="{StaticResource Ant.H4}" Content="Inverse:" />\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Tag Background="#FF5500" Content="#FF5500" ColorMode="Inverse" Closable="True" />\n
|
||||
\t\t<antd:Tag Background="#2DB7F5" Content="#2DB7F5" ColorMode="Inverse" />\n
|
||||
\t\t<antd:Tag Background="#87d068" Content="#87d068" ColorMode="Inverse" />\n
|
||||
\t\t<antd:Tag Background="#108EE9" Content="#108EE9" ColorMode="Inverse" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<Label Style="{StaticResource Ant.H4}" Content="Colorful:" />\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Tag Foreground="#EB2F96" Content="magenta" ColorMode="Colorful" Closable="True" />\n
|
||||
\t\t<antd:Tag Foreground="#F5222D" Content="red" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#FA541C" Content="volcano" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#FA8C16" Content="orange" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#FAAD14" Content="Gold" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#A0D911" Content="lime" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#52C41A" Content="green" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#13C2C2" Content="cyan" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#1890FF" Content="blue" ColorMode="Colorful" />\n
|
||||
\t\t<antd:Tag Foreground="#2F54EB" Content="purple" ColorMode="Colorful" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<Label Style="{StaticResource Ant.H4}" Content="Inverse:" />\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Tag Background="#FF5500" Content="#FF5500" ColorMode="Inverse" Closable="True" />\n
|
||||
\t\t<antd:Tag Background="#2DB7F5" Content="#2DB7F5" ColorMode="Inverse" />\n
|
||||
\t\t<antd:Tag Background="#87d068" Content="#87d068" ColorMode="Inverse" />\n
|
||||
\t\t<antd:Tag Background="#108EE9" Content="#108EE9" ColorMode="Inverse" />\n
|
||||
\t</WrapPanel>\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -161,13 +210,13 @@
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<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>
|
||||
<antd:CheckableTag Content="Tag1" />
|
||||
<antd:CheckableTag Content="Tag2" />
|
||||
<antd:CheckableTag Content="Tag3" />
|
||||
<antd:CheckableTag Content="Tag1" />
|
||||
<antd:CheckableTag Content="Tag2" />
|
||||
<antd:CheckableTag Content="Tag3" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
@@ -178,24 +227,30 @@
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<WrapPanel>
|
||||
<antd:Tag Content="Movies" Closable="True" Visibility="{Binding Visibility, Mode=TwoWay}" />
|
||||
<antd:Tag
|
||||
Closable="True"
|
||||
Content="Movies"
|
||||
Visibility="{Binding Visibility, Mode=TwoWay}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<antd:AntButton x:Name="Toggle" Size="Small" Content="Toggle" />
|
||||
<antd:AntButton
|
||||
Content="Toggle"
|
||||
Size="Small"
|
||||
x:Name="Toggle" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/AntIcons.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<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
|
||||
<StackPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Tag Content="Movies" Closable="True" Visibility="{Binding Visibility, Mode=TwoWay}" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Button x:Name="Toggle" Size="Small" Content="Toggle" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Tag Content="Movies" Closable="True" Visibility="{Binding Visibility, Mode=TwoWay}" />\n
|
||||
\t</WrapPanel>\n
|
||||
\t<WrapPanel>\n
|
||||
\t\t<antd:Button x:Name="Toggle" Size="Small" Content="Toggle" />\n
|
||||
\t</WrapPanel>\n
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
|
||||
@@ -1,60 +1,56 @@
|
||||
<UserControl x:Class="AntdWpfDemo.Views.ToolTipView"
|
||||
<UserControl x:Class="AntDesignWPFDemo.Views.ToolTipView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
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:antd="https://github.com/ShrlAlgo/AntdWpf"
|
||||
|
||||
xmlns:viewmodels="clr-namespace:AntDesignWPFDemo.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="930">
|
||||
d:DataContext="{d:DesignInstance Type=viewmodels:ToolTipViewModel}">
|
||||
|
||||
<ScrollViewer>
|
||||
<Grid Margin="16 0">
|
||||
<Grid Margin="16,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Ant.H1}" Content="Tooltip" />
|
||||
<Label Content="Tooltip" Style="{StaticResource Ant.H1}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="A simple text popup tip." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
||||
<Label Content="When To Use" Style="{StaticResource Ant.H2}" />
|
||||
<TextBlock Style="{StaticResource Ant.P}" Text="The tip is shown on mouse enter, and is hidden on mouse leave. The Tooltip doesn't support complex text or operations.
To provide an explanation of a button/text/operation. It's often used instead of the html title attribute." />
|
||||
|
||||
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
||||
<Label Content="Examples" Style="{StaticResource Ant.H2}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="antd:AntButton">
|
||||
<Setter Property="Margin" Value="8 0 0 8" />
|
||||
<Setter Property="Margin" Value="8,0,0,8" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="8 0">
|
||||
<StackPanel Margin="8,0">
|
||||
<antd:CodeBox Title="Basic">
|
||||
<antd:CodeBox.Description>
|
||||
The simplest usage.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>The simplest usage.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<TextBlock Text="Tooltip will show when mouse enter." ToolTip="prompt text" ToolTipService.Placement="Top" ToolTipService.ShowDuration="0" />
|
||||
<TextBlock Text="Tooltip will show when mouse enter."
|
||||
ToolTip="prompt text"
|
||||
ToolTipService.Placement="Top"
|
||||
ToolTipService.ShowDuration="0" />
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" />
|
||||
</WrapPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
<antd:CodeBox Title="Arrow pointing at the center">
|
||||
<antd:CodeBox.Description>
|
||||
By specifying `arrowPointAtCenter` prop, the arrow will point to the center of the target element.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>By specifying `arrowPointAtCenter` prop, the arrow will point to the center of the target element.</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<StackPanel>
|
||||
<WrapPanel>
|
||||
@@ -65,20 +61,16 @@
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" />
|
||||
</WrapPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="8 0">
|
||||
<StackPanel Grid.Column="1" Margin="8,0">
|
||||
<antd:CodeBox Title="Placement">
|
||||
<antd:CodeBox.Description>
|
||||
The ToolTip has 12 placements choice.
|
||||
</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Description>The ToolTip has 12 placements choice. ToolTipService.Placement="Left"</antd:CodeBox.Description>
|
||||
<antd:CodeBox.Content>
|
||||
<Grid MaxWidth="335">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -87,37 +79,35 @@
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<WrapPanel HorizontalAlignment="Center">
|
||||
<antd:AntButton Content="TL" />
|
||||
<antd:AntButton Content="Top" />
|
||||
<antd:AntButton Content="TR" />
|
||||
<antd:AntButton Content="TL" ToolTip="Prompt Text" ToolTipService.Placement="Top"/>
|
||||
<antd:AntButton Content="Top" ToolTip="Prompt Text" ToolTipService.Placement="Top"/>
|
||||
<antd:AntButton Content="TR" ToolTip="Prompt Text" ToolTipService.Placement="Top"/>
|
||||
</WrapPanel>
|
||||
<StackPanel Grid.Row="1" HorizontalAlignment="Left">
|
||||
<antd:AntButton Content="LT" />
|
||||
<antd:AntButton Content="Left" />
|
||||
<antd:AntButton Content="LB" />
|
||||
<antd:AntButton Content="LT" ToolTip="Prompt Text" ToolTipService.Placement="Left"/>
|
||||
<antd:AntButton Content="Left" ToolTip="Prompt Text" ToolTipService.Placement="Left"/>
|
||||
<antd:AntButton Content="LB" ToolTip="Prompt Text" ToolTipService.Placement="Left"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" HorizontalAlignment="Right">
|
||||
<antd:AntButton Content="RT" />
|
||||
<antd:AntButton Content="Right" />
|
||||
<antd:AntButton Content="RB" />
|
||||
<antd:AntButton Content="RT" ToolTip="Prompt Text" ToolTipService.Placement="Right"/>
|
||||
<antd:AntButton Content="Right" ToolTip="Prompt Text" ToolTipService.Placement="Right"/>
|
||||
<antd:AntButton Content="RB" ToolTip="Prompt Text" ToolTipService.Placement="Right"/>
|
||||
</StackPanel>
|
||||
<WrapPanel Grid.Row="2" HorizontalAlignment="Center">
|
||||
<antd:AntButton Content="BL" />
|
||||
<antd:AntButton Content="Bottom" />
|
||||
<antd:AntButton Content="BR" />
|
||||
<antd:AntButton Content="BL" ToolTip="Prompt Text" ToolTipService.Placement="Center"/>
|
||||
<antd:AntButton Content="Bottom" ToolTip="Prompt Text" ToolTipService.Placement="Center"/>
|
||||
<antd:AntButton Content="BR" ToolTip="Prompt Text" ToolTipService.Placement="Center"/>
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
</antd:CodeBox.Content>
|
||||
<antd:CodeBox.Code>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"\n\n
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" />
|
||||
</WrapPanel>
|
||||
</antd:CodeBox.Code>
|
||||
<antd:CodeBox.Code><ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Theme.xaml" />\n\n
|
||||
xmlns:antd="https://github.com/ShrlAlgo/AntDesignWPF"\n\n
|
||||
<WrapPanel>
|
||||
<antd:Switch IsChecked="True" />
|
||||
</WrapPanel></antd:CodeBox.Code>
|
||||
</antd:CodeBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user