set dialog to fullscreen when it is on small size
MODIFY
WalletWasabi.Fluent/Controls/Dialog.axaml
WalletWasabi.Fluent/Controls/Dialog.axaml
<Style Selector="c|Dialog:not(:open) /template/ Panel#PART_Overlay">
<Setter Property="Opacity" Value="0"/>
</Style>
+
+ <!-- Dialog Fullscreen State -->
+ <Style Selector="c|Dialog[FullScreenEnabled=True] /template/ Border#PART_Border">
+ <Setter Property="Margin" Value="0" />
+ </Style>
+ <Style Selector="c|Dialog[FullScreenEnabled=True] /template/ Panel#PART_DialogHost">
+ <Setter Property="Margin" Value="0" />
+ </Style>
</Styles>

MODIFY
WalletWasabi.Fluent/Controls/Dialog.axaml.cs
WalletWasabi.Fluent/Controls/Dialog.axaml.cs
@@ -7,6 +7,7 @@ using Avalonia.Controls.Primitives;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.VisualTree;
+using ReactiveUI;
namespace WalletWasabi.Fluent.Controls
{
@@ -43,9 +44,20 @@ namespace WalletWasabi.Fluent.Controls
public static readonly StyledProperty<double> MaxContentWidthProperty =
AvaloniaProperty.Register<Dialog, double>(nameof(MaxContentWidth), double.PositiveInfinity);
+ public static readonly StyledProperty<bool> FullScreenEnabledProperty =
+ AvaloniaProperty.Register<Dialog, bool>(nameof(FullScreenEnabled));
+
public Dialog()
{
this.GetObservable(IsDialogOpenProperty).Subscribe(UpdateDelay);
+
+ this.WhenAnyValue(x => x.Bounds)
+ .Subscribe(bounds =>
+ {
+ var width = bounds.Width;
+ var height = bounds.Height;
+ FullScreenEnabled = width < 600 && height < 600;
+ });
}
public bool IsDialogOpen
@@ -96,6 +108,12 @@ namespace WalletWasabi.Fluent.Controls
set => SetValue(MaxContentWidthProperty, value);
}
+ public bool FullScreenEnabled
+ {
+ get => GetValue(FullScreenEnabledProperty);
+ set => SetValue(FullScreenEnabledProperty, value);
+ }
+
private CancellationTokenSource? CancelPointerPressedDelay { get; set; }
private void UpdateDelay(bool isDialogOpen)

set dialog to fullscreen when it is on small size