use panel directly
MODIFY
WalletWasabi.Fluent/Controls/Dialog.xaml
WalletWasabi.Fluent/Controls/Dialog.xaml
<Setter Property="Template">
<ControlTemplate>
<Panel>
- <Panel Background="{DynamicResource DialogOverlayColor}" Name="PART_Overlay">
- <Button Name="PART_OverlayButton" Classes="invisible" />
- </Panel>
+ <Panel Background="{DynamicResource DialogOverlayColor}" Name="PART_Overlay" />
<Panel Name="PART_DialogHost" VerticalAlignment="Center" HorizontalAlignment="Center">
<Border CornerRadius="5" BoxShadow="{DynamicResource DialogBoxShadow}" Background="{DynamicResource DialogBackground}" >
<ContentPresenter Name="PART_ContentPresenter"

MODIFY
WalletWasabi.Fluent/Controls/Dialog.xaml.cs
WalletWasabi.Fluent/Controls/Dialog.xaml.cs
@@ -41,8 +41,8 @@ namespace WalletWasabi.Fluent.Controls
{
base.OnApplyTemplate(e);
- var overlayButton = e.NameScope.Find<Button>("PART_OverlayButton");
- overlayButton.Click += delegate { IsDialogOpen = false; };
+ var overlayButton = e.NameScope.Find<Panel>("PART_Overlay");
+ overlayButton.PointerPressed += (_,__) => IsDialogOpen = false;
}
}
}

use panel directly