Made the simple lock work
MODIFY
WalletWasabi.Gui/Controls/LockScreen/SimpleLock.xaml
WalletWasabi.Gui/Controls/LockScreen/SimpleLock.xaml
xmlns:lockscreen="clr-namespace:WalletWasabi.Gui.Controls.LockScreen;assembly=WalletWasabi.Gui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Styles>
- <Style Selector="Grid.Locking">
+ <Style Selector="Grid.Locked">
<Style.Animations>
<Animation
FillMode="Both"
Duration="0:0:1.5"
- Easing="QuarticEaseInOut"
- IterationCount="Infinite">
+ Easing="QuarticEaseInOut">
<KeyFrame Cue="0%">
<Setter Property="Opacity" Value="0"/>
<Setter Property="TranslateTransform.Y" Value="-100"/>
</Animation>
</Style.Animations>
</Style>
- <Style Selector="Grid.Unlocking">
+ <Style Selector="Grid.Unlocked">
<Style.Animations>
<Animation
FillMode="Both"
Duration="0:0:1.5"
- Easing="QuarticEaseInOut"
- IterationCount="Infinite">
+ Easing="QuarticEaseInOut">
<KeyFrame Cue="0%">
- <Setter Property="Opacity" Value="0"/>
- <Setter Property="TranslateTransform.Y" Value="-100"/>
+ <Setter Property="Opacity" Value="1"/>
<Setter Property="IsHitTestVisible" Value="True"/>
</KeyFrame>
<KeyFrame Cue="100%">
- <Setter Property="Opacity" Value="1"/>
- <Setter Property="TranslateTransform.Y" Value="0"/>
+ <Setter Property="Opacity" Value="0"/>
+ <Setter Property="TranslateTransform.Y" Value="-100"/>
</KeyFrame>
</Animation>
</Style.Animations>

MODIFY
WalletWasabi.Gui/Controls/LockScreen/SimpleLock.xaml.cs
WalletWasabi.Gui/Controls/LockScreen/SimpleLock.xaml.cs
@@ -7,14 +7,44 @@ using Avalonia.Markup.Xaml;
using Avalonia.Controls.Primitives;
using ReactiveUI;
using Avalonia;
+using Avalonia.Interactivity;
namespace WalletWasabi.Gui.Controls.LockScreen
{
internal class SimpleLock : LockScreenImpl
{
+ public Grid Shade { get; }
+
public SimpleLock()
{
InitializeComponent();
+ var unlockButton = this.FindControl<Button>("UnlockButton");
+
+ this.Shade = this.FindControl<Grid>("Shade");
+
+ unlockButton.Click += unlockButton_Clicked;
+
+ this.WhenAnyValue(x => x.IsLocked)
+ .Subscribe(IsLockedChanged);
+ }
+
+ private void IsLockedChanged(bool obj)
+ {
+ if (obj)
+ {
+ Shade.Classes.Add("Locked");
+ Shade.Classes.Remove("Unlocked");
+ }
+ else
+ {
+ Shade.Classes.Add("Unlocked");
+ Shade.Classes.Remove("Locked");
+ }
+ }
+
+ private void unlockButton_Clicked(object sender, RoutedEventArgs e)
+ {
+ this.IsLocked = false;
}
private void InitializeComponent()

Made the simple lock work