Simplify MainView
MODIFY
WalletWasabi.Fluent/Views/MainWindow.axaml
WalletWasabi.Fluent/Views/MainWindow.axaml
xmlns:behaviors="using:WalletWasabi.Fluent.Behaviors"
xmlns:i="using:Avalonia.Xaml.Interactivity"
xmlns:viewModels="clr-namespace:WalletWasabi.Fluent.ViewModels"
+ xmlns:shell="clr-namespace:WalletWasabi.Fluent.Views.Shell"
mc:Ignorable="d" d:DesignWidth="536" d:DesignHeight="459"
x:Class="WalletWasabi.Fluent.Views.MainWindow"
x:DataType="viewModels:MainViewModel"
</i:Interaction.Behaviors>
<Panel Margin="{Binding #MainWindow.OffScreenMargin}">
- <local:MainView />
+ <shell:ShellView />
</Panel>
</Window>

ADD
WalletWasabi.Fluent/Views/Shell/DialogsView.axaml
+<UserControl xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ xmlns:c="using:WalletWasabi.Fluent.Controls"
+ xmlns:vm="using:WalletWasabi.Fluent.ViewModels"
+ x:DataType="vm:MainViewModel"
+ x:CompileBindings="False"
+ x:Class="WalletWasabi.Fluent.Views.Shell.DialogsView">
+ <Panel>
+ <ExperimentalAcrylicBorder IsVisible="{Binding IsOobeBackgroundVisible, FallbackValue=False}">
+ <ExperimentalAcrylicBorder.Material>
+ <ExperimentalAcrylicMaterial BackgroundSource="Digger"
+ TintColor="{DynamicResource SystemAltHighColor}"
+ TintOpacity="0.8"
+ FallbackColor="{DynamicResource AcrylicFallbackColor}"
+ MaterialOpacity="0.2" />
+ </ExperimentalAcrylicBorder.Material>
+ <Viewbox Stretch="Uniform" ClipToBounds="False">
+ <ContentControl Template="{StaticResource WelcomeBg}" ClipToBounds="False" />
+ </Viewbox>
+ </ExperimentalAcrylicBorder>
+ <c:Dialog DataContext="{Binding FullScreen}"
+ IsDialogOpen="{Binding IsDialogOpen, Mode=TwoWay}"
+ IsActive="{Binding CurrentPage.IsActive}"
+ IsBusy="{Binding CurrentPage.IsBusy, FallbackValue=False}"
+ IsBackEnabled="{Binding CurrentPage.EnableBack, FallbackValue=False}"
+ IsCancelEnabled="{Binding CurrentPage.EnableCancel, FallbackValue=False}"
+ EnableCancelOnPressed="{Binding CurrentPage.EnableCancelOnPressed, FallbackValue=True}"
+ EnableCancelOnEscape="{Binding CurrentPage.EnableCancelOnEscape, FallbackValue=True}"
+ IsEnabled="{Binding $parent.DataContext.IsFullScreenEnabled}"
+ HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
+ HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
+ IncreasedWidthThreshold="740" IncreasedHeightThreshold="580" FullScreenHeightThreshold="580">
+ <c:Dialog.Styles>
+ <Style Selector="c|Dialog /template/ Panel#PART_Overlay">
+ <Setter Property="Background" Value="{DynamicResource RegionColor}" />
+ </Style>
+ <Style Selector="c|Dialog /template/ Border#PART_Border">
+ <Setter Property="Margin" Value="0" />
+ <Setter Property="CornerRadius" Value="0" />
+ <Setter Property="BoxShadow" Value="" />
+ </Style>
+ </c:Dialog.Styles>
+ <ContentControl Content="{Binding CurrentPage}" />
+ </c:Dialog>
+ <c:Dialog DataContext="{Binding DialogScreen}"
+ IsDialogOpen="{Binding IsDialogOpen, Mode=TwoWay}"
+ IsActive="{Binding CurrentPage.IsActive}"
+ IsBusy="{Binding CurrentPage.IsBusy, FallbackValue=False}"
+ IsBackEnabled="{Binding CurrentPage.EnableBack, FallbackValue=False}"
+ IsCancelEnabled="{Binding CurrentPage.EnableCancel, FallbackValue=False}"
+ EnableCancelOnPressed="{Binding CurrentPage.EnableCancelOnPressed, FallbackValue=True}"
+ EnableCancelOnEscape="{Binding CurrentPage.EnableCancelOnEscape, FallbackValue=True}"
+ IsEnabled="{Binding $parent.DataContext.IsDialogScreenEnabled}"
+ HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
+ HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
+ MaxContentWidth="800" MaxContentHeight="700"
+ IncreasedWidthThreshold="740" IncreasedHeightThreshold="580" FullScreenHeightThreshold="580">
+ <ContentControl Content="{Binding CurrentPage}" />
+ </c:Dialog>
+ <c:Dialog DataContext="{Binding CompactDialogScreen}"
+ IsDialogOpen="{Binding IsDialogOpen, Mode=TwoWay}"
+ IsActive="{Binding CurrentPage.IsActive}"
+ IsBusy="{Binding CurrentPage.IsBusy, FallbackValue=False}"
+ IsBackEnabled="{Binding CurrentPage.EnableBack, FallbackValue=False}"
+ IsCancelEnabled="{Binding CurrentPage.EnableCancel, FallbackValue=False}"
+ EnableCancelOnPressed="{Binding CurrentPage.EnableCancelOnPressed, FallbackValue=True}"
+ EnableCancelOnEscape="{Binding CurrentPage.EnableCancelOnEscape, FallbackValue=True}"
+ IsEnabled="{Binding $parent.DataContext.IsDialogScreenEnabled}"
+ HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+ <ContentControl Content="{Binding CurrentPage}" />
+ </c:Dialog>
+ </Panel>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Shell/DialogsView.axaml.cs
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Shell;
+public partial class DialogsView : UserControl
+{
+ public DialogsView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+}

MODIFY
WalletWasabi.Fluent/Views/Shell/MainView.axaml
WalletWasabi.Fluent/Views/Shell/MainView.axaml
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:c="using:WalletWasabi.Fluent.Controls"
xmlns:navbar="using:WalletWasabi.Fluent.Views.NavBar"
xmlns:ext="using:WalletWasabi.Fluent.Helpers"
- xmlns:vm="using:WalletWasabi.Fluent.ViewModels"
xmlns:statusBar="clr-namespace:WalletWasabi.Fluent.Views.StatusBar"
xmlns:wallets="clr-namespace:WalletWasabi.Fluent.Views.Wallets"
xmlns:spectrum="clr-namespace:WalletWasabi.Fluent.Controls.Spectrum"
xmlns:searchBar="clr-namespace:WalletWasabi.Fluent.Views.SearchBar"
- xmlns:converters="clr-namespace:WalletWasabi.Fluent.Converters"
- mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="459"
- x:DataType="vm:MainViewModel"
- x:CompileBindings="True"
- x:Class="WalletWasabi.Fluent.Views.MainView">
- <Panel>
- <Panel>
- <Panel IsEnabled="{Binding IsMainContentEnabled}">
- <ExperimentalAcrylicBorder IsHitTestVisible="False">
- <ExperimentalAcrylicBorder.Material>
- <ExperimentalAcrylicMaterial BackgroundSource="Digger"
- TintColor="Transparent"
- TintOpacity="0"
- FallbackColor="{DynamicResource AcrylicTrimBackground}"
- MaterialOpacity="0" />
- </ExperimentalAcrylicBorder.Material>
- </ExperimentalAcrylicBorder>
- <Panel IsHitTestVisible="False" Background="{DynamicResource AcrylicTrimBackground}"/>
+ xmlns:c="using:WalletWasabi.Fluent.Controls"
+ xmlns:viewModels="clr-namespace:WalletWasabi.Fluent.ViewModels"
+ x:Class="WalletWasabi.Fluent.Views.Shell.MainView"
+ x:DataType="viewModels:MainViewModel"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ d:DesignWidth="1200" d:DesignHeight="1000"
+ x:CompileBindings="True">
<Grid ColumnDefinitions="68, *, 150" RowDefinitions="48, *">
</Panel>
</Border>
- <searchBar:SearchBar DataContext="{Binding SearchBar}" Width="400" VerticalAlignment="Stretch" x:CompileBindings="False"
- Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" IsHitTestVisible="{Binding $parent.DataContext.IsMainContentEnabled, FallbackValue=True}" />
+ <searchBar:SearchBar DataContext="{Binding SearchBar}" Width="400" VerticalAlignment="Stretch"
+ Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" />
</Grid>
- </Panel>
- <ExperimentalAcrylicBorder DockPanel.Dock="Left" IsHitTestVisible="False"
- IsVisible="{Binding IsOobeBackgroundVisible, FallbackValue=False}">
- <ExperimentalAcrylicBorder.Material>
- <ExperimentalAcrylicMaterial BackgroundSource="Digger"
- TintColor="{DynamicResource SystemAltHighColor}"
- TintOpacity="0.8"
- FallbackColor="{DynamicResource AcrylicFallbackColor}"
- MaterialOpacity="0.2" />
- </ExperimentalAcrylicBorder.Material>
- <Viewbox Stretch="Uniform" ClipToBounds="False">
- <ContentControl Template="{StaticResource WelcomeBg}" ClipToBounds="False" />
- </Viewbox>
- </ExperimentalAcrylicBorder>
- <c:AdornerCanvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="{Binding $parent[Window].OffScreenMargin, Converter={x:Static converters:ThicknessConverters.Negate}}" />
- <c:Dialog x:CompileBindings="False"
- DataContext="{Binding FullScreen}"
- IsDialogOpen="{Binding IsDialogOpen, Mode=TwoWay}"
- IsActive="{Binding CurrentPage.IsActive}"
- IsBusy="{Binding CurrentPage.IsBusy, FallbackValue=False}"
- IsBackEnabled="{Binding CurrentPage.EnableBack, FallbackValue=False}"
- IsCancelEnabled="{Binding CurrentPage.EnableCancel, FallbackValue=False}"
- EnableCancelOnPressed="{Binding CurrentPage.EnableCancelOnPressed, FallbackValue=True}"
- EnableCancelOnEscape="{Binding CurrentPage.EnableCancelOnEscape, FallbackValue=True}"
- IsEnabled="{Binding $parent.DataContext.IsFullScreenEnabled}"
- HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
- IncreasedWidthThreshold="740" IncreasedHeightThreshold="580" FullScreenHeightThreshold="580">
- <c:Dialog.Styles>
- <Style Selector="c|Dialog /template/ Panel#PART_Overlay">
- <Setter Property="Background" Value="{DynamicResource RegionColor}" />
- </Style>
- <Style Selector="c|Dialog /template/ Border#PART_Border">
- <Setter Property="Margin" Value="0" />
- <Setter Property="CornerRadius" Value="0" />
- <Setter Property="BoxShadow" Value="" />
- </Style>
- </c:Dialog.Styles>
- <ContentControl Content="{Binding CurrentPage}" />
- </c:Dialog>
- <c:Dialog x:CompileBindings="False"
- DataContext="{Binding DialogScreen}"
- IsDialogOpen="{Binding IsDialogOpen, Mode=TwoWay}"
- IsActive="{Binding CurrentPage.IsActive}"
- IsBusy="{Binding CurrentPage.IsBusy, FallbackValue=False}"
- IsBackEnabled="{Binding CurrentPage.EnableBack, FallbackValue=False}"
- IsCancelEnabled="{Binding CurrentPage.EnableCancel, FallbackValue=False}"
- EnableCancelOnPressed="{Binding CurrentPage.EnableCancelOnPressed, FallbackValue=True}"
- EnableCancelOnEscape="{Binding CurrentPage.EnableCancelOnEscape, FallbackValue=True}"
- IsEnabled="{Binding $parent.DataContext.IsDialogScreenEnabled}"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
- HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
- MaxContentWidth="800" MaxContentHeight="700"
- IncreasedWidthThreshold="740" IncreasedHeightThreshold="580" FullScreenHeightThreshold="580">
- <ContentControl Content="{Binding CurrentPage}" />
- </c:Dialog>
- <c:Dialog x:CompileBindings="False"
- DataContext="{Binding CompactDialogScreen}"
- IsDialogOpen="{Binding IsDialogOpen, Mode=TwoWay}"
- IsActive="{Binding CurrentPage.IsActive}"
- IsBusy="{Binding CurrentPage.IsBusy, FallbackValue=False}"
- IsBackEnabled="{Binding CurrentPage.EnableBack, FallbackValue=False}"
- IsCancelEnabled="{Binding CurrentPage.EnableCancel, FallbackValue=False}"
- EnableCancelOnPressed="{Binding CurrentPage.EnableCancelOnPressed, FallbackValue=True}"
- EnableCancelOnEscape="{Binding CurrentPage.EnableCancelOnEscape, FallbackValue=True}"
- IsEnabled="{Binding $parent.DataContext.IsDialogScreenEnabled}"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <ContentControl Content="{Binding CurrentPage}" />
- </c:Dialog>
- </Panel>
- </Panel>
</UserControl>

MODIFY
WalletWasabi.Fluent/Views/Shell/MainView.axaml.cs
WalletWasabi.Fluent/Views/Shell/MainView.axaml.cs
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
-namespace WalletWasabi.Fluent.Views;
+namespace WalletWasabi.Fluent.Views.Shell;
-public class MainView : UserControl
+public partial class MainView : UserControl
{
public MainView()
{

ADD
WalletWasabi.Fluent/Views/Shell/ShellView.axaml
+<UserControl xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:c="using:WalletWasabi.Fluent.Controls"
+ xmlns:vm="using:WalletWasabi.Fluent.ViewModels"
+ xmlns:views="clr-namespace:WalletWasabi.Fluent.Views"
+ xmlns:shell="clr-namespace:WalletWasabi.Fluent.Views.Shell"
+ mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="459"
+ x:DataType="vm:MainViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Shell.ShellView">
+ <Panel>
+ <Panel x:Name="Background" IsHitTestVisible="False">
+ <ExperimentalAcrylicBorder>
+ <ExperimentalAcrylicBorder.Material>
+ <ExperimentalAcrylicMaterial BackgroundSource="Digger"
+ TintColor="Transparent"
+ TintOpacity="0"
+ FallbackColor="{DynamicResource AcrylicTrimBackground}"
+ MaterialOpacity="0" />
+ </ExperimentalAcrylicBorder.Material>
+ </ExperimentalAcrylicBorder>
+ <Panel Background="{DynamicResource AcrylicTrimBackground}" />
+ </Panel>
+ <shell:MainView x:CompileBindings="False" IsHitTestVisible="{Binding $parent.DataContext.IsMainContentEnabled, FallbackValue=True}" />
+ <c:AdornerCanvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
+ <shell:DialogsView />
+ </Panel>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Shell/ShellView.axaml.cs
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Shell;
+
+public class ShellView : UserControl
+{
+ public ShellView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+}

Simplify MainView