Files
Ursa.Avalonia/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml
2024-01-12 14:43:19 +08:00

35 lines
1.5 KiB
XML

<UserControl
x:Class="Ursa.Demo.Pages.MessageBoxDemo"
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:vm="using:Ursa.Demo.ViewModels"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="vm:MessageBoxDemoViewModel"
mc:Ignorable="d">
<UserControl.Styles>
<Style Selector="Button">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Margin" Value="8"></Setter>
</Style>
</UserControl.Styles>
<StackPanel HorizontalAlignment="Left">
<ComboBox ItemsSource="{Binding Icons}" SelectedItem="{Binding SelectedIcon}" />
<ToggleSwitch Content="Try Long Message" IsChecked="{Binding UseLong}"></ToggleSwitch>
<ToggleSwitch Content="Show Title" IsChecked="{Binding UseTitle}"></ToggleSwitch>
<Button Command="{Binding DefaultMessageBoxCommand}" Content="Default" />
<Button Command="{Binding OkCommand}" Content="OK" />
<Button Command="{Binding OkCancelCommand}" Content="OKCancel" />
<Button Command="{Binding YesNoCommand}" Content="YesNo" />
<Button Command="{Binding YesNoCancelCommand}" Content="YesNoCancel" />
<TextBlock>
<Run Text="Last Clicked Result: "></Run>
<Run Text="{Binding Result}"></Run>
</TextBlock>
</StackPanel>
</UserControl>