login control
MODIFY
WalletWasabi.Fluent/App.axaml
WalletWasabi.Fluent/App.axaml
<StyleInclude Source="avares://WalletWasabi.Fluent/Controls/NavBarItem.axaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Controls/NavBarTreeItem.axaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Controls/TileButton.axaml" />
+ <StyleInclude Source="avares://WalletWasabi.Fluent/Controls/LoginControl.axaml" />
</Application.Styles>
<NativeMenu.Menu>
<NativeMenu>

ADD
WalletWasabi.Fluent/Controls/LoginControl.axaml.cs
+using Avalonia;
+using Avalonia.Controls;
+
+namespace WalletWasabi.Fluent.Controls
+{
+ public class LoginControl : ContentControl
+ {
+ public static readonly StyledProperty<bool> IsBusyProperty =
+ AvaloniaProperty.Register<ContentArea, bool>(nameof(IsBusy));
+
+ public bool IsBusy
+ {
+ get => GetValue(IsBusyProperty);
+ set => SetValue(IsBusyProperty, value);
+ }
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModelBase.cs
@@ -39,7 +39,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
{
if (Wallet.State == WalletState.Uninitialized)
{
- Navigate().To(new SimpleLoginViewModel(this, walletManager));
+ Navigate().To(new LoginViewModel(this, walletManager));
}
else
{

MODIFY
WalletWasabi.Fluent/Views/Login/FullScreenLoginView.axaml
WalletWasabi.Fluent/Views/Login/FullScreenLoginView.axaml
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls"
- xmlns:loginViews="clr-namespace:WalletWasabi.Fluent.Views.Login"
xmlns:login="clr-namespace:WalletWasabi.Fluent.ViewModels.Login"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="login:FullScreenLoginViewModel"
x:CompileBindings="True"
x:Class="WalletWasabi.Fluent.Views.Login.FullScreenLoginView">
- <c:ContentArea Title="Login"
- Caption="Enter your password to access your wallet"
- ScrollViewer.VerticalScrollBarVisibility="Disabled"
- IsBusy="{Binding Login.IsBusy}">
+ <c:ContentArea ScrollViewer.VerticalScrollBarVisibility="Disabled"
+ IsBusy="{Binding IsBusy}">
<Panel>
- <loginViews:LoginView DataContext="{Binding Login}"/>
+ <c:LoginControl/>
- <ComboBox SelectedIndex="0"
+ <ComboBox SelectedItem="{Binding SelectedWallet}"
+ Items="{Binding Wallets}"
HorizontalAlignment="Right"
VerticalAlignment="Bottom">
- <ComboBoxItem>Wallet #1</ComboBoxItem>
- <ComboBoxItem>Wallet #2</ComboBoxItem>
- <ComboBoxItem>Wallet #3</ComboBoxItem>
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Text="{Binding Wallet.WalletName}"/>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
</ComboBox>
-
- <StackPanel Orientation="Horizontal">
- <Button>X</Button>
- <Button>Y</Button>
- <Button>Z</Button>
- </StackPanel>
</Panel>
</c:ContentArea>
</UserControl>

MODIFY
WalletWasabi.Fluent/Views/Login/LoginView.axaml.cs
WalletWasabi.Fluent/Views/Login/LoginView.axaml.cs
using Avalonia.Controls;
-using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
namespace WalletWasabi.Fluent.Views.Login

DELETE
WalletWasabi.Fluent/Views/Login/SimpleLoginView.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="clr-namespace:WalletWasabi.Fluent.Controls"
- xmlns:loginViews="clr-namespace:WalletWasabi.Fluent.Views.Login"
- xmlns:login="clr-namespace:WalletWasabi.Fluent.ViewModels.Login"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:DataType="login:SimpleLoginViewModel"
- x:CompileBindings="True"
- x:Class="WalletWasabi.Fluent.Views.Login.SimpleLoginView">
- <c:ContentArea Title="Login"
- Caption="Enter your password to access your wallet"
- DataContext="{Binding Login}"
- HorizontalAlignment="Stretch"
- ScrollViewer.VerticalScrollBarVisibility="Disabled"
- IsBusy="{Binding IsBusy}">
- <loginViews:LoginView />
- </c:ContentArea>
-</UserControl>

DELETE
WalletWasabi.Fluent/Views/Login/SimpleLoginView.axaml.cs
-using Avalonia.Controls;
-using Avalonia.Markup.Xaml;
-
-namespace WalletWasabi.Fluent.Views.Login
-{
- public class SimpleLoginView : UserControl
- {
- public SimpleLoginView()
- {
- InitializeComponent();
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
- }
-}

login control