fix dialog sizing.
MODIFY
WalletWasabi.Fluent/Controls/Dialog.xaml
WalletWasabi.Fluent/Controls/Dialog.xaml
<Panel>
<Panel Background="{DynamicResource DialogOverlayColor}" Name="PART_Overlay" />
<Panel Name="PART_DialogHost" VerticalAlignment="{TemplateBinding VerticalAlignment}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="40">
- <Border CornerRadius="4" BoxShadow="{DynamicResource DialogBoxShadow}" Background="{DynamicResource DialogBackground}">
+ <Border CornerRadius="4" BoxShadow="{DynamicResource DialogBoxShadow}"
+ Background="{DynamicResource DialogBackground}"
+ MaxWidth="{TemplateBinding MaxContentWidth}" MaxHeight="{TemplateBinding MaxContentHeight}" Margin="40">
<ContentPresenter Name="PART_ContentPresenter" Margin="20 36 20 0"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"

MODIFY
WalletWasabi.Fluent/Controls/Dialog.xaml.cs
WalletWasabi.Fluent/Controls/Dialog.xaml.cs
+using System;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
@@ -12,12 +13,30 @@ namespace WalletWasabi.Fluent.Controls
public static readonly StyledProperty<bool> IsDialogOpenProperty =
AvaloniaProperty.Register<Dialog, bool>(nameof(IsDialogOpen));
+ public static readonly StyledProperty<double> MaxContentHeightProperty =
+ AvaloniaProperty.Register<Dialog, double>(nameof(MaxContentHeight), double.PositiveInfinity);
+
+ public static readonly StyledProperty<double> MaxContentWidthProperty =
+ AvaloniaProperty.Register<Dialog, double>(nameof(MaxContentWidth), double.PositiveInfinity);
+
public bool IsDialogOpen
{
get => GetValue(IsDialogOpenProperty);
set => SetValue(IsDialogOpenProperty, value);
}
+ public double MaxContentHeight
+ {
+ get { return GetValue(MaxContentHeightProperty); }
+ set { SetValue(MaxContentHeightProperty, value); }
+ }
+
+ public double MaxContentWidth
+ {
+ get { return GetValue(MaxContentWidthProperty); }
+ set { SetValue(MaxContentWidthProperty, value); }
+ }
+
protected override void OnPropertyChanged<T>(AvaloniaPropertyChangedEventArgs<T> change)
{
base.OnPropertyChanged(change);

MODIFY
WalletWasabi.Fluent/Views/MainView.axaml
WalletWasabi.Fluent/Views/MainView.axaml
</DockPanel>
</Panel>
</SplitView>
- <c:Dialog DataContext="{Binding DialogScreen}" IsDialogOpen="{Binding IsDialogVisible, Mode=TwoWay}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <rxui:RoutedViewHost Router="{Binding Router}" MaxWidth="800" MaxHeight="700" Margin="40">
+ <c:Dialog MaxContentWidth="800" MaxContentHeight="700" DataContext="{Binding DialogScreen}" IsDialogOpen="{Binding IsDialogVisible, Mode=TwoWay}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+ <rxui:RoutedViewHost Router="{Binding Router}">
<rxui:RoutedViewHost.ViewLocator>
<vl:ScreenViewLocator />
</rxui:RoutedViewHost.ViewLocator>

fix dialog sizing.