69 lines
2.9 KiB
XML
69 lines
2.9 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:u="https://irihi.tech/ursa"
|
|
xmlns:vm="clr-namespace:Ursa.Demo.ViewModels"
|
|
x:DataType="vm:BannerDemoViewModel"
|
|
mc:Ignorable="d">
|
|
<Design.DataContext>
|
|
<vm:BannerDemoViewModel />
|
|
</Design.DataContext>
|
|
<ScrollViewer>
|
|
<StackPanel Spacing="20">
|
|
<u:Banner
|
|
Name="banner"
|
|
Classes.Bordered="{Binding Bordered}"
|
|
Header="{Binding Title}"
|
|
Content="{Binding Content}" />
|
|
<u:Form Width="500">
|
|
<TextBox
|
|
Classes="ClearButton"
|
|
IsEnabled="{Binding SetTitleNull}"
|
|
Text="{Binding Title}">
|
|
<u:FormItem.Label>
|
|
<StackPanel Orientation="Horizontal">
|
|
<CheckBox Content="Title" IsChecked="{Binding SetTitleNull}" />
|
|
</StackPanel>
|
|
</u:FormItem.Label>
|
|
</TextBox>
|
|
<TextBox
|
|
Classes="ClearButton TextArea"
|
|
IsEnabled="{Binding SetContentNull}"
|
|
Text="{Binding Content}"
|
|
TextWrapping="Wrap">
|
|
<u:FormItem.Label>
|
|
<CheckBox Content="Content" IsChecked="{Binding SetContentNull}" />
|
|
</u:FormItem.Label>
|
|
</TextBox>
|
|
<u:EnumSelector
|
|
u:FormItem.Label="NotificationType"
|
|
EnumType="NotificationType"
|
|
Value="{Binding #banner.Type}" />
|
|
<u:EnumSelector
|
|
u:FormItem.Label="HorizontalContentAlignment"
|
|
EnumType="HorizontalAlignment"
|
|
Value="{Binding #banner.HorizontalContentAlignment}" />
|
|
<ToggleSwitch
|
|
Theme="{StaticResource SimpleToggleSwitch}"
|
|
u:FormItem.Label="Bordered"
|
|
IsChecked="{Binding Bordered}" />
|
|
<ToggleSwitch
|
|
Theme="{StaticResource SimpleToggleSwitch}"
|
|
u:FormItem.Label="ShowIcon"
|
|
IsChecked="{Binding #banner.ShowIcon}" />
|
|
<ToggleSwitch
|
|
Theme="{StaticResource SimpleToggleSwitch}"
|
|
u:FormItem.Label="CanClose"
|
|
IsChecked="{Binding #banner.CanClose}" />
|
|
<ToggleSwitch
|
|
Theme="{StaticResource SimpleToggleSwitch}"
|
|
u:FormItem.Label="IsVisible"
|
|
IsChecked="{Binding #banner.IsVisible}" />
|
|
</u:Form>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</UserControl>
|