Code cleanup and format some xaml files
MODIFY
WalletWasabi.Gui/Controls/LockScreen/PinLockScreen.xaml
WalletWasabi.Gui/Controls/LockScreen/PinLockScreen.xaml
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
IsLocked="{Binding IsLocked}">
<lockscreen:PinLockScreen.Styles>
-
<Style Selector="Grid.Shade">
<Setter Property="Opacity" Value="0" />
<Setter Property="TranslateTransform.Y" Value="-100" />
</Style>
-
<Style Selector="lockscreen|PinLockScreen[IsLocked=true] Grid.Shade">
<Style.Animations>
<Animation FillMode="Both" Duration="0:0:1.5" Easing="QuarticEaseInOut">
</Animation>
</Style.Animations>
</Style>
-
<Style Selector="lockscreen|PinLockScreen[IsLocked=false] Grid.Shade">
<Style.Animations>
<Animation FillMode="Both" Duration="0:0:1.5" Easing="QuarticEaseInOut">
<DockPanel LastChildFill="True">
<controls:NoparaPasswordBox x:Name="InputField" Password="{Binding PinInput}" Width="300" DockPanel.Dock="Top" Margin="4 0 4 20" Watermark="PIN" UseFloatingWatermark="True" />
<Grid DockPanel.Dock="Bottom">
- <TextBlock Text="Wrong PIN!"
- Margin="0,12,0,0" VerticalAlignment="Center" FontSize="20" Classes="warningMessage" IsVisible="{Binding WarningMessageVisible}" />
+ <TextBlock Text="Wrong PIN!" Margin="0,12,0,0" VerticalAlignment="Center" FontSize="20" Classes="warningMessage" IsVisible="{Binding WarningMessageVisible}" />
</Grid>
<Grid RowDefinitions="*,*,*,*" ColumnDefinitions="*,*,*">
<Grid.Styles>

MODIFY
WalletWasabi.Gui/Controls/LockScreen/PinLockScreen.xaml.cs
WalletWasabi.Gui/Controls/LockScreen/PinLockScreen.xaml.cs
@@ -36,6 +36,11 @@ namespace WalletWasabi.Gui.Controls.LockScreen
.Subscribe(x => inputField.Focus());
}
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
{
base.OnAttachedToVisualTree(e);
@@ -52,10 +57,5 @@ namespace WalletWasabi.Gui.Controls.LockScreen
inputField.Focus();
});
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
}

MODIFY
WalletWasabi.Gui/Controls/LockScreen/SlideLockScreen.xaml.cs
WalletWasabi.Gui/Controls/LockScreen/SlideLockScreen.xaml.cs
@@ -56,6 +56,27 @@ namespace WalletWasabi.Gui.Controls.LockScreen
private TranslateTransform TargetTransform { get; } = new TranslateTransform();
private Thumb DragThumb { get; }
+ public SlideLockScreen() : base()
+ {
+ InitializeComponent();
+
+ DragThumb = this.FindControl<Thumb>("PART_DragThumb");
+ this.FindControl<Grid>("Shade").RenderTransform = TargetTransform;
+
+ DataContextChanged += delegate
+ {
+ if (DataContext is SlideLockScreenViewModel)
+ {
+ OnDataContextChanged();
+ }
+ };
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+
public void OnDataContextChanged()
{
var vm = DataContext as SlideLockScreenViewModel;
@@ -117,26 +138,5 @@ namespace WalletWasabi.Gui.Controls.LockScreen
.Subscribe(vm.OnClockTick)
.DisposeWith(vm.Disposables);
}
-
- public SlideLockScreen() : base()
- {
- InitializeComponent();
-
- DragThumb = this.FindControl<Thumb>("PART_DragThumb");
- this.FindControl<Grid>("Shade").RenderTransform = TargetTransform;
-
- DataContextChanged += delegate
- {
- if (DataContext is SlideLockScreenViewModel)
- {
- OnDataContextChanged();
- }
- };
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
}

MODIFY
WalletWasabi.Gui/MainWindow.xaml
WalletWasabi.Gui/MainWindow.xaml
xmlns:cont="clr-namespace:AvalonStudio.Shell.Controls;assembly=AvalonStudio.Shell"
xmlns:wasabi="clr-namespace:WalletWasabi.Gui.Controls;assembly=WalletWasabi.Gui"
xmlns:lockscreen="clr-namespace:WalletWasabi.Gui.Controls.LockScreen;assembly=WalletWasabi.Gui"
- xmlns:behaviors="clr-namespace:WalletWasabi.Gui.Behaviors;assembly=WalletWasabi.Gui"
xmlns:shell="clr-namespace:AvalonStudio.Shell;assembly=AvalonStudio.Shell"
xmlns:menu="clr-namespace:AvalonStudio.Shell.Extensibility.MainMenu.Views;assembly=AvalonStudio.Shell.Extensibility"
- xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
- xmlns:ia="clr-namespace:Avalonia.Xaml.Interactions.Core;assembly=Avalonia.Xaml.Interactions"
xmlns:id="clr-namespace:Dock.Avalonia;assembly=Dock.Avalonia"
- xmlns:idc="clr-namespace:Dock.Avalonia.Controls;assembly=Dock.Avalonia"
- xmlns:beh="clr-namespace:AvalonStudio.Utils.Behaviors;assembly=AvalonStudio.Utils"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Icon="resm:WalletWasabi.Gui.Assets.WasabiLogo256.png?assembly=WalletWasabi.Gui"
Title="{Binding Title}"
MinWidth="1100" MinHeight="530"
Foreground="{DynamicResource ThemeForegroundBrush}"
Width="{Binding Width}" Height="{Binding Height}"
WindowState="{Binding WindowState}"
- UseLayoutRounding="True" RenderOptions.BitmapInterpolationMode="HighQuality"
+ UseLayoutRounding="True"
+ RenderOptions.BitmapInterpolationMode="HighQuality"
id:DragBehavior.IsEnabled="False" id:DropBehavior.IsEnabled="False">
<cont:MetroWindow.TitleBarContent>
<StackPanel Orientation="Horizontal" IsVisible="{Binding !$parent[cont|MetroWindow].DataContext.LockScreen.IsLocked}">
<Style Selector="Menu > MenuItem:selected /template/ Border#root">
<Setter Property="Background" Value="{DynamicResource ThemeControlMidBrush}" />
</Style>
-
<Style Selector="Menu > MenuItem">
<Setter Property="Padding" Value="7 0" />
</Style>

MODIFY
WalletWasabi.Gui/Tabs/SettingsView.xaml
WalletWasabi.Gui/Tabs/SettingsView.xaml
<StackPanel Margin="30" Spacing="10">
<Grid Classes="content">
<StackPanel Orientation="Vertical" Spacing="30">
-
<controls:GroupBox Title="Bitcoin" TextBlock.FontSize="16" Padding="10" Margin="0 5 10 5">
<StackPanel Orientation="Vertical" Spacing="5">
<StackPanel Margin="0 10" Spacing="5">
</DropDown.ItemTemplate>
</DropDown>
</StackPanel>
-
<controls:GroupBox Title="{Binding Network, StringFormat=My Node for \{0\}, Converter={StaticResource NetworkStringConverter}}" TextBlock.FontSize="16" Padding="10" Margin="0 5 10 5">
<StackPanel Orientation="Vertical" Spacing="5">
<StackPanel Margin="0 10" Spacing="5">
</controls:GroupBox>
</StackPanel>
</controls:GroupBox>
-
<controls:GroupBox Title="Tor" TextBlock.FontSize="16" Padding="10" Margin="0 5 10 5">
<StackPanel Orientation="Vertical" Spacing="5">
<StackPanel Margin="0 10" Orientation="Horizontal" Spacing="5">
</StackPanel>
</StackPanel>
</controls:GroupBox>
-
<controls:GroupBox Title="UI" TextBlock.FontSize="16" Padding="10" Margin="0 5 10 5">
<StackPanel Orientation="Vertical" Spacing="5">
<StackPanel Margin="0 10" Orientation="Horizontal" Spacing="5">
<controls:GroupBox Title="Anonymity Levels" TextBlock.FontSize="16" Padding="10" Margin="0 5 10 5">
<StackPanel Orientation="Vertical" Spacing="5">
<Grid Margin="0 10" ColumnDefinitions="30, *">
- <DrawingPresenter Height="24" Width="24" Grid.Column="0"
- Margin="0 0 10 10"
- VerticalAlignment="Center" HorizontalAlignment="Center"
- Drawing="{DynamicResource PrivacySome}" />
+ <DrawingPresenter Height="24" Width="24" Grid.Column="0" Margin="0 0 10 10" VerticalAlignment="Center" HorizontalAlignment="Center" Drawing="{DynamicResource PrivacySome}" />
<TextBox Text="{Binding SomePrivacyLevel}" Grid.Column="1">
<i:Interaction.Behaviors>
<behaviors:CommandOnLostFocusBehavior Command="{Binding TextBoxLostFocusCommand}" />
</TextBox>
</Grid>
<Grid Margin="0 10" ColumnDefinitions="30, *">
- <DrawingPresenter Height="24" Width="24" Grid.Column="0"
- Margin="0 0 10 10"
- VerticalAlignment="Center" HorizontalAlignment="Center"
- Drawing="{DynamicResource PrivacyFine}" />
+ <DrawingPresenter Height="24" Width="24" Grid.Column="0" Margin="0 0 10 10" VerticalAlignment="Center" HorizontalAlignment="Center" Drawing="{DynamicResource PrivacyFine}" />
<TextBox Text="{Binding FinePrivacyLevel}" Grid.Column="1">
<i:Interaction.Behaviors>
<behaviors:CommandOnLostFocusBehavior Command="{Binding TextBoxLostFocusCommand}" />
</TextBox>
</Grid>
<Grid Margin="0 10" ColumnDefinitions="30, *">
- <DrawingPresenter Height="24" Width="24" Grid.Column="0"
- Margin="0 0 10 10"
- VerticalAlignment="Center" HorizontalAlignment="Center"
- Drawing="{DynamicResource PrivacyStrong}" />
+ <DrawingPresenter Height="24" Width="24" Grid.Column="0" Margin="0 0 10 10" VerticalAlignment="Center" HorizontalAlignment="Center" Drawing="{DynamicResource PrivacyStrong}" />
<TextBox Text="{Binding StrongPrivacyLevel}" Grid.Column="1">
<i:Interaction.Behaviors>
<behaviors:CommandOnLostFocusBehavior Command="{Binding TextBoxLostFocusCommand}" />
</Grid>
</StackPanel>
</controls:GroupBox>
-
<controls:GroupBox Title="Other settings" TextBlock.FontSize="16" Padding="10" Margin="0 5 10 5">
<StackPanel Orientation="Vertical" Spacing="5">
<StackPanel Margin="0 10" Spacing="5">
</StackPanel>
</StackPanel>
</controls:GroupBox>
-
<Button Content="Open Config File" Command="{Binding OpenConfigFileCommand}" />
</StackPanel>
</Grid>

Code cleanup and format some xaml files