v1.08 — Custom Fluent confirmation dialog, replace all MessageBox
- New ConfirmDialog overlay with dark backdrop, rounded card, shadow - Warning/Question/Error icon types with accent colors - Replaced all MessageBox.Show calls (RemovePage, PreInstallCheck, Troubleshoot) - Click outside dialog = cancel Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
41
Pages/ConfirmDialog.xaml
Normal file
41
Pages/ConfirmDialog.xaml
Normal file
@@ -0,0 +1,41 @@
|
||||
<UserControl x:Class="InstaSoftOfficeTool.Pages.ConfirmDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Visibility="Collapsed">
|
||||
|
||||
<!-- Backdrop overlay -->
|
||||
<Grid>
|
||||
<Border Background="#66000000" MouseDown="Backdrop_MouseDown"/>
|
||||
|
||||
<!-- Dialog card -->
|
||||
<Border Background="{StaticResource CardBrush}" CornerRadius="12"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
MinWidth="400" MaxWidth="500" Padding="28,24">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect ShadowDepth="8" BlurRadius="32" Opacity="0.2" Color="Black"/>
|
||||
</Border.Effect>
|
||||
|
||||
<StackPanel>
|
||||
<!-- Icon + Title -->
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
|
||||
<TextBlock x:Name="DialogIcon" FontFamily="Segoe MDL2 Assets" FontSize="22"
|
||||
VerticalAlignment="Center" Margin="0,0,12,0"/>
|
||||
<TextBlock x:Name="DialogTitle" FontSize="18" FontWeight="SemiBold"
|
||||
VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Message -->
|
||||
<TextBlock x:Name="DialogMessage" FontSize="14" TextWrapping="Wrap"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,0,0,24"/>
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button x:Name="BtnCancel" Style="{StaticResource SecondaryButton}"
|
||||
Click="BtnCancel_Click" Margin="0,0,8,0"/>
|
||||
<Button x:Name="BtnConfirm" Style="{StaticResource PrimaryButton}"
|
||||
Click="BtnConfirm_Click"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user