61 lines
2.4 KiB
XML
61 lines
2.4 KiB
XML
<UserControl
|
|
x:Class="Ursa.Demo.Pages.BannerDemo"
|
|
xmlns="https://github.com/avaloniaui"
|
|
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:pages="clr-namespace:Ursa.Demo.Pages"
|
|
xmlns:u="https://irihi.tech/ursa"
|
|
x:DataType="pages:BannerDemoViewModel"
|
|
mc:Ignorable="d">
|
|
<Design.DataContext>
|
|
<pages:BannerDemoViewModel />
|
|
</Design.DataContext>
|
|
<StackPanel Spacing="20">
|
|
<Grid ColumnDefinitions="*, 300">
|
|
<u:Banner
|
|
Margin="20"
|
|
Grid.Column="0"
|
|
Classes.Bordered="{Binding Bordered}"
|
|
CanClose="{Binding CanClose}"
|
|
Content="This is the Demo of Ursa Banner. "
|
|
Header="Welcome to Ursa"
|
|
Type="{Binding SelectedType}" />
|
|
<Border Grid.Column="1" VerticalAlignment="Top">
|
|
<Grid ColumnDefinitions="*, Auto" RowDefinitions="*, *, *">
|
|
<Label
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Content="Type" />
|
|
<u:EnumSelector
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Width="200"
|
|
EnumType="NotificationType"
|
|
Value="{Binding SelectedType}" />
|
|
<Label
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Content="Bordered" />
|
|
<ToggleSwitch
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
IsChecked="{Binding Bordered}" />
|
|
<Label
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Content="CanClose" />
|
|
<ToggleSwitch
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
IsChecked="{Binding CanClose}" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</StackPanel>
|
|
</UserControl> |