organize the general settings tab.
MODIFY
WalletWasabi.Fluent/Controls/ContentArea.axaml
WalletWasabi.Fluent/Controls/ContentArea.axaml
<Style Selector="c|ContentArea">
<Setter Property="Template">
<ControlTemplate>
- <DockPanel Margin="20,0,20,0">
+ <DockPanel Margin="20,0,10,0">
<StackPanel DockPanel.Dock="Top" Spacing="10" Margin="0 0 0 20">
<DockPanel>
<Button Margin="-20,0,0,0" Classes="plain" Command="{Binding BackCommand}" IsVisible="{TemplateBinding EnableBack}">
</i:Interaction.Behaviors>
</Button>
</Panel>
- <ScrollViewer HorizontalScrollBarVisibility="Disabled" Margin="0 0 0 32">
+ <ScrollViewer HorizontalScrollBarVisibility="Disabled" Margin="0 0 0 32" Padding="0 0 10 0">
<ContentPresenter Name="PART_ContentPresenter"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"

MODIFY
WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
@@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
+using WalletWasabi.Fluent.ViewModels.Settings;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Fluent.ViewModels.Wallets;

RENAME
WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
-using ReactiveUI;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -10,6 +9,7 @@ using Avalonia;
using Avalonia.Markup.Xaml.Styling;
using Avalonia.Threading;
using NBitcoin;
+using ReactiveUI;
using Splat;
using WalletWasabi.Fluent.ViewModels.NavBar;
using WalletWasabi.Gui;
@@ -21,7 +21,7 @@ using WalletWasabi.Logging;
using WalletWasabi.Models;
using WalletWasabi.Userfacing;
-namespace WalletWasabi.Fluent.ViewModels
+namespace WalletWasabi.Fluent.ViewModels.Settings
{
public class SettingsPageViewModel : NavBarItemViewModel
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/ClosedWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/ClosedWalletViewModel.cs
@@ -6,6 +6,7 @@ using System.Reactive;
using System.Reactive.Linq;
using System.Threading.Tasks;
using WalletWasabi.Fluent.ViewModels.NavBar;
+using WalletWasabi.Fluent.ViewModels.Settings;
using WalletWasabi.Gui.Helpers;
using WalletWasabi.Logging;
using WalletWasabi.Wallets;

ADD
WalletWasabi.Fluent/Views/Settings/GeneralSettingsView.xaml
+<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:settings="clr-namespace:WalletWasabi.Fluent.ViewModels.Settings"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:DataType="settings:SettingsPageViewModel"
+ x:Class="WalletWasabi.Fluent.Views.Settings.GeneralSettingsView">
+ <StackPanel Spacing="20" MaxWidth="650" HorizontalAlignment="Left" Orientation="Vertical">
+ <StackPanel.Styles>
+ <Style Selector="DockPanel > TextBlock">
+ <Setter Property="Margin" Value="0 8 20 0" />
+ <Setter Property="VerticalAlignment" Value="Top" />
+ <Setter Property="(DockPanel.Dock)" Value="Left" />
+ </Style>
+ <Style Selector="DockPanel > ToggleSwitch">
+ <Setter Property="HorizontalAlignment" Value="Right" />
+ </Style>
+ </StackPanel.Styles>
+
+ <DockPanel>
+ <TextBlock Text="Dark Mode"/>
+ <ToggleSwitch IsChecked="{Binding DarkModeEnabled}" />
+ </DockPanel>
+
+ <DockPanel>
+ <TextBlock Text="Auto Copy/Paste Bitcoin addresses" />
+ <ToggleSwitch IsChecked="{Binding Autocopy}" />
+ </DockPanel>
+
+ <DockPanel>
+ <TextBlock Text="Manual fee entry." />
+ <ToggleSwitch IsChecked="{Binding CustomFee}" />
+ </DockPanel>
+
+ <DockPanel>
+ <TextBlock VerticalAlignment="Center" Text= "Custom change address." />
+ <ToggleSwitch IsChecked="{Binding CustomChangeAddress}" />
+ </DockPanel>
+
+ <StackPanel Spacing="10">
+ <TextBlock Text= "Fee Display Format" />
+ <DropDown HorizontalAlignment="Stretch" Items="{Binding FeeDisplayFormats}" SelectedItem="{Binding SelectedFeeDisplayFormat}">
+ <!--<DropDown.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Text="{Binding Converter={StaticResource FeeDisplayFormatStringConverter}}" />
+ </DataTemplate>
+ </DropDown.ItemTemplate>-->
+ </DropDown>
+ </StackPanel>
+
+ <StackPanel Spacing="10">
+ <TextBlock ToolTip.Tip="Coins under the dust threshold won't appear in the coin lists." Text= "Dust Threshold (BTC)" />
+ <TextBox Text="{Binding DustThreshold}" />
+ </StackPanel>
+ </StackPanel>
+</UserControl>
\ No newline at end of file

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

RENAME
WalletWasabi.Fluent/Views/SettingsPageView.xaml
WalletWasabi.Fluent/Views/Settings/SettingsPageView.xaml
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:v="using:WalletWasabi.Fluent.Views.Settings"
xmlns:c="using:WalletWasabi.Fluent.Controls"
xmlns:vm="using:WalletWasabi.Fluent.ViewModels"
+ xmlns:settings="clr-namespace:WalletWasabi.Fluent.ViewModels.Settings"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:DataType="vm:SettingsPageViewModel"
- x:Class="WalletWasabi.Fluent.Views.SettingsPageView">
+ x:DataType="settings:SettingsPageViewModel"
+ x:Class="WalletWasabi.Fluent.Views.Settings.SettingsPageView">
<UserControl.Styles>
<Style Selector="TabItem">
<Setter Property="FontSize" Value="12" />
<c:ContentArea Title="Settings" Caption="Manage appearance, privacy and other settings">
<TabControl>
<TabItem Header="General">
- <StackPanel Spacing="20" MaxWidth="650" HorizontalAlignment="Left" Orientation="Vertical">
- <StackPanel.Styles>
- <Style Selector="WrapPanel > TextBlock">
- <Setter Property="MinWidth" Value="300" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
- </StackPanel.Styles>
-
- <WrapPanel>
- <Panel Background="Green" Width="300">
- <TextBlock>Dark Mode</TextBlock>
- </Panel>
- <Panel Background="Blue" Height="20" Width="72.66">
- </Panel>
- <!--<ToggleSwitch IsChecked="{Binding DarkModeEnabled}" />-->
- </WrapPanel>
-
- <WrapPanel>
- <TextBlock>Auto Copy/Paste Bitcoin addresses</TextBlock>
- <ToggleSwitch IsChecked="{Binding Autocopy}" />
- </WrapPanel>
-
- <WrapPanel>
- <TextBlock>Manual fee entry.</TextBlock>
- <ToggleSwitch IsChecked="{Binding CustomFee}" />
- </WrapPanel>
-
- <WrapPanel>
- <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">Custom change address.</TextBlock>
- <ToggleSwitch IsChecked="{Binding CustomChangeAddress}" />
- </WrapPanel>
-
- <WrapPanel>
- <TextBlock MinWidth="200" DockPanel.Dock="Left">Fee Display Format</TextBlock>
- <Panel Width="200" HorizontalAlignment="Stretch" Background="Red">
- <Button Content="Testing 123 ABC 123" />
- </Panel>
-
- </WrapPanel>
-
- <StackPanel>
- <TextBlock ToolTip.Tip="Coins under the dust threshold won't appear in the coin lists.">Dust Threshold (BTC)</TextBlock>
- <TextBox Text="{Binding DustThreshold}" />
- </StackPanel>
- </StackPanel>
+ <v:GeneralSettingsView />
</TabItem>
<TabItem Header="Privacy">
<StackPanel Orientation="Vertical" Spacing="5">
<StackPanel Margin="0 10" Orientation="Horizontal" Spacing="5">
<ToggleSwitch IsChecked="{Binding UseTor}" Margin="0 0 10 0" />
- <TextBlock VerticalAlignment="Center">Tor can be turned off for debugging.</TextBlock>
+ <TextBlock VerticalAlignment="Center" Text= "Tor can be turned off for debugging." />
</StackPanel>
<StackPanel Margin="0 10" Spacing="5" IsVisible="{Binding UseTor}">
- <TextBlock>Tor SOCKS5 Endpoint</TextBlock>
+ <TextBlock Text="Tor SOCKS5 Endpoint" />
<TextBox Text="{Binding TorSocks5EndPoint}" />
</StackPanel>
<StackPanel Margin="0 10" Orientation="Horizontal" Spacing="5" IsVisible="{Binding UseTor}">
<ToggleSwitch IsChecked="{Binding TerminateTorOnExit}" Margin="0 0 10 0" />
- <TextBlock VerticalAlignment="Center">Terminate Tor process on exit.</TextBlock>
+ <TextBlock VerticalAlignment="Center" Text= "Terminate Tor process on exit." />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Header="Node">
<StackPanel Orientation="Vertical" Spacing="5">
<StackPanel Margin="0 10" Spacing="5">
- <TextBlock>Network</TextBlock>
+ <TextBlock Text="Network" />
<ComboBox Items="{Binding Networks}" SelectedItem="{Binding Network}">
<!--<ComboBox.ItemTemplate>
<DataTemplate>
</StackPanel>
<Panel>
<StackPanel Orientation="Vertical" Spacing="5">
- <TextBlock Classes="warningMessage">Work in progress...</TextBlock>
- <TextBlock>Use your own Bitcoin Core or Wasabi's built-in Bitcoin Knots.</TextBlock>
- <TextBlock>Expect high CPU, network usage and 300+ GB disk space requirement.</TextBlock>
+ <TextBlock Classes="warningMessage" Text= "Work in progress..." />
+ <TextBlock Text="Use your own Bitcoin Core or Wasabi's built-in Bitcoin Knots." />
+ <TextBlock Text="Expect high CPU, network usage and 300+ GB disk space requirement." />
<StackPanel Margin="0 10" Orientation="Horizontal" Spacing="5">
<ToggleSwitch IsChecked="{Binding StartLocalBitcoinCoreOnStartup}" Margin="0 0 10 0" />
- <TextBlock VerticalAlignment="Center">Run Bitcoin Knots at Wasabi's startup.</TextBlock>
+ <TextBlock VerticalAlignment="Center" Text= "Run Bitcoin Knots at Wasabi's startup." />
</StackPanel>
<StackPanel Margin="0 10" Spacing="5" IsVisible="{Binding StartLocalBitcoinCoreOnStartup}">
- <TextBlock>Bitcoin Core or Bitcoin Knots Data Folder</TextBlock>
+ <TextBlock Text="Bitcoin Core or Bitcoin Knots Data Folder" />
<TextBox Text="{Binding LocalBitcoinCoreDataDir}" />
</StackPanel>
<StackPanel Margin="0 10" Orientation="Horizontal" Spacing="5" IsVisible="{Binding StartLocalBitcoinCoreOnStartup}">
<ToggleSwitch IsChecked="{Binding StopLocalBitcoinCoreOnShutdown}" Margin="0 0 10 0" />
- <TextBlock VerticalAlignment="Center">Stop Bitcoin Knots when Wasabi is shut down.</TextBlock>
+ <TextBlock VerticalAlignment="Center" Text= "Stop Bitcoin Knots when Wasabi is shut down." />
</StackPanel>
</StackPanel>
</Panel>
<Panel IsVisible="{Binding !StartLocalBitcoinCoreOnStartup}">
<StackPanel Orientation="Vertical" Spacing="5">
- <TextBlock>Set Wasabi to download blocks from a full node you control.</TextBlock>
+ <TextBlock Text="Set Wasabi to download blocks from a full node you control." />
<StackPanel Margin="0 10" Spacing="5">
- <TextBlock>Bitcoin P2P Endpoint</TextBlock>
+ <TextBlock Text="Bitcoin P2P Endpoint" />
<TextBox Text="{Binding BitcoinP2pEndPoint}" />
</StackPanel>
</StackPanel>

RENAME
WalletWasabi.Fluent/Views/SettingsPageView.xaml.cs
WalletWasabi.Fluent/Views/Settings/SettingsPageView.xaml.cs
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
-using WalletWasabi.Fluent.ViewModels;
+using WalletWasabi.Fluent.ViewModels.Settings;
-namespace WalletWasabi.Fluent.Views
+namespace WalletWasabi.Fluent.Views.Settings
{
public class SettingsPageView : ReactiveUserControl<SettingsPageViewModel>
{

organize the general settings tab.