Files
Ursa.Avalonia/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml
2025-01-09 22:15:37 +08:00

35 lines
1.6 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" />
</Style>
</UserControl.Styles>
<StackPanel HorizontalAlignment="Left">
<ComboBox ItemsSource="{Binding Icons}" SelectedItem="{Binding SelectedIcon}" />
<ToggleSwitch Content="Try Long Message" IsChecked="{Binding UseLong}" />
<ToggleSwitch Content="Show Title" IsChecked="{Binding UseTitle}" />
<ToggleSwitch Content="Overlay" IsChecked="{Binding UseOverlay}" />
<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 Text="{Binding Result}" />
</TextBlock>
</StackPanel>
</UserControl>