Dispenser/DispenserUI/Views/Windows/ConfirmDialogWindow.axaml

48 lines
2.8 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:windows="clr-namespace:DispenserUI.Views.Windows"
SystemDecorations="None"
WindowStartupLocation="CenterScreen"
Height="1080"
Width="1920"
WindowState="FullScreen"
TransparencyLevelHint="AcrylicBlur"
Background="Transparent"
TransparencyBackgroundFallback="Transparent"
x:Class="DispenserUI.Views.Windows.ConfirmDialogWindow"
Title="ConfirmDialog">
<Border x:Name="UserFormBorder" Padding="20,50,20,30" CornerRadius="12" Background="#AA000000" Width="400"
Height="250">
<Grid RowDefinitions="*,60">
<TextBlock Grid.Row="0" Margin="0,0,0,0" FontSize="20" HorizontalAlignment="Center"
Text="{Binding Content, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=windows:ConfirmDialogWindow}}"
Foreground="White" FontWeight="Bold"
TextWrapping="WrapWithOverflow" />
<Grid Grid.Row="1" ColumnDefinitions="*,*" HorizontalAlignment="Stretch" VerticalAlignment="Center"
Margin="0,20,0,0">
<Button Grid.Column="0" Width="150" Height="40" Cursor="Hand"
VerticalAlignment="Center"
HorizontalAlignment="Left"
IsVisible="{Binding ShowCancel, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=windows:ConfirmDialogWindow}}"
Click="Cancel"
CornerRadius="10" Background="#A4ACB9">
<TextBlock
Text="{Binding CancelText, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=windows:ConfirmDialogWindow}}"
Foreground="White" FontSize="16" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Grid.Column="1" Width="150" Height="40" Cursor="Hand"
IsVisible="{Binding ShowConfirm, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=windows:ConfirmDialogWindow}}"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Click="Confirm"
CornerRadius="10" Background="#5F57FF">
<TextBlock
Text="{Binding ConfirmText, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=windows:ConfirmDialogWindow}}"
Foreground="White" FontSize="16" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
</Grid>
</Grid>
</Border>
</Window>