201 lines
13 KiB
XML
201 lines
13 KiB
XML
<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">
|
|
<ScrollViewer>
|
|
<Grid Margin="16 0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel>
|
|
<Label Style="{StaticResource Ant.H1}" Content="Alert" />
|
|
<TextBlock Style="{StaticResource Ant.P}" Text="Alert component for feedback." />
|
|
|
|
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
|
<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" />
|
|
</StackPanel>
|
|
<Grid Grid.Row="1">
|
|
<Grid.Resources>
|
|
<Style TargetType="antd:Alert">
|
|
<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" >
|
|
<antd:CodeBox.Description>
|
|
The simplest usage for short messages.
|
|
</antd:CodeBox.Description>
|
|
<antd:CodeBox.Content>
|
|
<antd:Alert Type="Success" Message="Success Text" />
|
|
</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:Alert Type="Success" Message="Success Text" />
|
|
</antd:CodeBox.Code>
|
|
</antd:CodeBox>
|
|
<antd:CodeBox Title="Closable">
|
|
<antd:CodeBox.Description>
|
|
To show close button.
|
|
</antd:CodeBox.Description>
|
|
<antd:CodeBox.Content>
|
|
<StackPanel>
|
|
<antd:Alert Type="Warning" Closable="True" 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.Description>
|
|
Error Description Error Description Error Description Error Description Error Description Error Description
|
|
</antd:Alert.Description>
|
|
</antd:Alert>
|
|
</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<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>
|
|
<antd:CodeBox Title="Icon">
|
|
<antd:CodeBox.Description>
|
|
Decent icon make information more clear and more friendly.
|
|
</antd:CodeBox.Description>
|
|
<antd:CodeBox.Content>
|
|
<StackPanel>
|
|
<antd:Alert Type="Success" Message="Success Tips" ShowIcon="True" />
|
|
<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" />
|
|
</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<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">
|
|
<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="Info Text" />
|
|
<antd:Alert Type="Warning" Message="Warning Text" />
|
|
<antd:Alert Type="Error" Message="Error 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
|
|
<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
|
|
</StackPanel>
|
|
</antd:CodeBox.Code>
|
|
</antd:CodeBox>
|
|
<antd:CodeBox Title="Description">
|
|
<antd:CodeBox.Description>
|
|
Additional description for alert message.
|
|
</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" />
|
|
</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<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>
|
|
<antd:CodeBox Title="Customized Close Text">
|
|
<antd:CodeBox.Description>
|
|
Replace the default icon with customized text.
|
|
</antd:CodeBox.Description>
|
|
<antd:CodeBox.Content>
|
|
<StackPanel>
|
|
<antd:Alert Message="Info Text" CloseText="Close Now" />
|
|
</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<antd:Alert Message="Info Text" CloseText="Close Now" />\n
|
|
</StackPanel>
|
|
</antd:CodeBox.Code>
|
|
</antd:CodeBox>
|
|
<antd:CodeBox Title="Smoothly Unmount">
|
|
<antd:CodeBox.Description>
|
|
Smoothly and unaffectedly unmount Alert.
|
|
</antd:CodeBox.Description>
|
|
<antd:CodeBox.Content>
|
|
<StackPanel>
|
|
<antd:Alert Message="Alert Message Text" Closable="True" />
|
|
<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
|
|
<StackPanel>\n
|
|
\t<antd:Alert Message="Alert Message Text" Closable="True" />\n
|
|
\t<TextBlock Text="placeholder text here" />\n
|
|
</StackPanel>
|
|
</antd:CodeBox.Code>
|
|
</antd:CodeBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</UserControl>
|