correct implementation for dialog sizing.
MODIFY
WalletWasabi.Fluent/Controls/Dialog.axaml
WalletWasabi.Fluent/Controls/Dialog.axaml
<Styles.Resources>
</Styles.Resources>
<Style Selector="c|Dialog">
+ <Setter Property="VerticalContentAlignment" Value="Center" />
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
+ <Setter Property="HorizontalAlignment" Value="Stretch" />
+ <Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="Template">
<ControlTemplate>
<Panel>
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}"
Padding="{TemplateBinding Padding}"
- VerticalContentAlignment="Stretch"
- HorizontalContentAlignment="Stretch"/>
+ VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
+ HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
</Border>
</Panel>
</Panel>

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/Base/DialogScreenViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/Base/DialogScreenViewModel.cs
@@ -10,14 +10,9 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs.Base
public partial class DialogScreenViewModel : TargettedNavigationStack
{
[AutoNotify] private bool _isDialogOpen;
- [AutoNotify] private double _maxContentWidth;
- [AutoNotify] private double _maxContentHeight;
- public DialogScreenViewModel(double maxContentWidth, double maxContentHeight, NavigationTarget navigationTarget = NavigationTarget.DialogScreen) : base(navigationTarget)
+ public DialogScreenViewModel(NavigationTarget navigationTarget = NavigationTarget.DialogScreen) : base(navigationTarget)
{
- _maxContentWidth = maxContentWidth;
- _maxContentHeight = maxContentHeight;
-
this.WhenAnyValue(x => x.IsDialogOpen)
.Skip(1) // Skip the initial value change (which is false).
.DistinctUntilChanged()

MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -43,11 +43,11 @@ namespace WalletWasabi.Fluent.ViewModels
_global = global;
_legalChecker = global.LegalChecker;
- _dialogScreen = new DialogScreenViewModel(800, 700);
+ _dialogScreen = new DialogScreenViewModel();
- _fullScreen = new DialogScreenViewModel(double.PositiveInfinity, double.PositiveInfinity, NavigationTarget.FullScreen);
+ _fullScreen = new DialogScreenViewModel(NavigationTarget.FullScreen);
- _compactDialogScreen = new DialogScreenViewModel(480, 270, NavigationTarget.CompactDialogScreen);
+ _compactDialogScreen = new DialogScreenViewModel( NavigationTarget.CompactDialogScreen);
MainScreen = new TargettedNavigationStack(NavigationTarget.HomeScreen);

MODIFY
WalletWasabi.Fluent/Views/MainView.axaml
WalletWasabi.Fluent/Views/MainView.axaml
EnableCancelOnEscape="True"
IsEnabled="{Binding $parent.DataContext.IsDialogScreenEnabled}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
- MaxContentWidth="{Binding MaxContentWidth}" MaxContentHeight="{Binding MaxContentHeight}">
+ HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
+ MaxContentWidth="800" MaxContentHeight="700">
<ContentControl Content="{Binding CurrentPage}" />
</c:Dialog>
<c:Dialog x:CompileBindings="False"
EnableCancelOnPressed="False"
EnableCancelOnEscape="True"
IsEnabled="{Binding $parent.DataContext.IsFullScreenEnabled}"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
- MaxContentWidth="{Binding MaxContentWidth}" MaxContentHeight="{Binding MaxContentHeight}">
+ HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
+ HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<c:Dialog.Styles>
<Style Selector="c|Dialog /template/ Panel#PART_DialogHost">
<Setter Property="Margin" Value="20,30,20,20"/>
EnableCancelOnPressed="False"
EnableCancelOnEscape="True"
IsEnabled="{Binding $parent.DataContext.IsDialogScreenEnabled}"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
- MaxContentWidth="{Binding MaxContentWidth}" MaxContentHeight="{Binding MaxContentHeight}">
+ HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<ContentControl Content="{Binding CurrentPage}" />
</c:Dialog>
</Panel>

correct implementation for dialog sizing.