mirror of
https://github.com/PrismLibrary/Prism.git
synced 2026-10-29 05:26:34 +08:00
31 lines
1.5 KiB
XML
31 lines
1.5 KiB
XML
<UserControl x:Class="HelloWorld.Dialogs.ConfirmationDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
Width="300" Height="150">
|
|
|
|
<prism:Dialog.WindowStyle>
|
|
<Style TargetType="Window">
|
|
<Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
|
|
<Setter Property="ResizeMode" Value="NoResize"/>
|
|
<Setter Property="ShowInTaskbar" Value="False"/>
|
|
<Setter Property="SizeToContent" Value="WidthAndHeight"/>
|
|
</Style>
|
|
</prism:Dialog.WindowStyle>
|
|
|
|
<Grid x:Name="LayoutRoot" Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<ContentControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" Content="{Binding Message}"/>
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button Content="OK" Command="{Binding CloseDialogCommand}" CommandParameter="True" Width="75" Height="25" HorizontalAlignment="Right" Margin="0,10,0,0" />
|
|
<Button Content="Cancel" Command="{Binding CloseDialogCommand}" CommandParameter="False" Width="75" Height="25" HorizontalAlignment="Right" Margin="20,10,0,0" IsDefault="True"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|