Files
Ursa.Avalonia/demo/Ursa.Demo/Dialogs/DialogWithAction.axaml
2024-02-05 22:06:17 +08:00

44 lines
1.6 KiB
XML

<UserControl
x:Class="Ursa.Demo.Dialogs.DialogWithAction"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ursa.Demo.Dialogs"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="local:DialogWithActionViewModel"
Background="{DynamicResource SemiYellow1}"
mc:Ignorable="d">
<Grid Margin="24" RowDefinitions="Auto, *, Auto">
<TextBlock
Grid.Row="0"
Margin="8"
FontSize="16"
FontWeight="600"
Text="{Binding Title}" />
<Calendar
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
SelectedDate="{Binding Date}" />
<StackPanel
Grid.Row="2"
HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="8">
<Button Command="{Binding DialogCommand}" Content="Dialog" />
<Button Command="{Binding OKCommand}" Content="OK" />
<Button Command="{Binding CancelCommand}" Content="Cancel" />
<ComboBox>
<ComboBoxItem>A</ComboBoxItem>
<ComboBoxItem>B</ComboBoxItem>
<ComboBoxItem>C</ComboBoxItem>
</ComboBox>
</StackPanel>
</Grid>
</UserControl>