add invisible button style
MODIFY
WalletWasabi.Fluent/Controls/DialogContentHost.cs
WalletWasabi.Fluent/Controls/DialogContentHost.cs
@@ -35,5 +35,10 @@ namespace WalletWasabi.Fluent.Controls
get => GetValue(DialogHostProperty);
set => SetValue(DialogHostProperty, value);
}
+
+ public void CloseDialog()
+ {
+ DialogHost?.CloseDialog();
+ }
}
}

MODIFY
WalletWasabi.Fluent/Controls/DialogContentHost.xaml
WalletWasabi.Fluent/Controls/DialogContentHost.xaml
<Setter Property="Template">
<ControlTemplate>
<Panel>
- <Panel Background="#272727" Name="PART_Overlay" />
- <Panel Name="PART_DialogHost">
- <Border VerticalAlignment="Center" HorizontalAlignment="Center" CornerRadius="5" BoxShadow="4 11 30 1 #90000000" Background="#323232" >
+ <Panel Background="#272727" Name="PART_Overlay">
+ <Button Classes="invisible" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CloseDialog}"/>
+ </Panel>
+ <Panel Name="PART_DialogHost" VerticalAlignment="Center" HorizontalAlignment="Center">
+ <Border CornerRadius="5" BoxShadow="4 11 30 1 #90000000" Background="#323232" >
<ContentPresenter Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DialogHost.CurrentDialog}"/>
</Border>
</Panel>

MODIFY
WalletWasabi.Fluent/Styles/Styles.xaml
WalletWasabi.Fluent/Styles/Styles.xaml
<Setter Property="IsPaneOpen" Value="True" />
<Setter Property="PaneBackground" Value="{x:Null}" />
</Style>
+
+ <Style Selector="Button.invisible">
+ <Setter Property="VerticalAlignment" Value="Stretch" />
+ <Setter Property="HorizontalAlignment" Value="Stretch" />
+ </Style>
+ <Style Selector="Button.invisible /template/ ContentPresenter">
+ <Setter Property="Background" Value="Transparent" />
+ </Style>
+ <Style Selector="Button.invisible:pointerover /template/ ContentPresenter">
+ <Setter Property="Background" Value="Transparent" />
+ </Style>
+ <Style Selector="Button.invisible:pressed /template/ ContentPresenter">
+ <Setter Property="Background" Value="Transparent" />
+ </Style>
+
</Styles>

MODIFY
WalletWasabi.Fluent/ViewModels/TestDialogViewModel.cs
WalletWasabi.Fluent/ViewModels/TestDialogViewModel.cs
@@ -12,11 +12,6 @@ namespace WalletWasabi.Fluent.ViewModels
protected override void DialogShown()
{
- Task.Run(async () =>
- {
- await Task.Delay(5000);
- CloseDialog("Done");
- });
}
}
}

add invisible button style