Add hide/show animation for MusicControls
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/MusicControlsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/MusicControlsViewModel.cs
+using System.Reactive.Linq;
+
namespace WalletWasabi.Fluent.ViewModels.Wallets;
-public class MusicControlsViewModel : ViewModelBase
+public partial class MusicControlsViewModel : ViewModelBase
+{
+ [AutoNotify] private bool _isActive;
+
+ public MusicControlsViewModel()
{
+ Observable.Interval(TimeSpan.FromMilliseconds(3000))
+ .Subscribe(token => IsActive = !IsActive);
+ }
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/MusicControlsView.axaml
WalletWasabi.Fluent/Views/Wallets/MusicControlsView.axaml
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:wallets="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="WalletWasabi.Fluent.Views.Wallets.MusicControlsView">
+ <UserControl.DataContext>
+ <wallets:MusicControlsViewModel/>
+ </UserControl.DataContext>
<UserControl.Styles>
<Style Selector="TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
+
+ <Style Selector="Border#PART_MainBorder.IsActive">
+ <Style.Animations>
+ <Animation Duration="0:0:0.2" Easing="{StaticResource FluentEasing}" FillMode="Both">
+ <KeyFrame Cue="100%">
+ <Setter Property="(TranslateTransform.Y)" Value="120" />
+ </KeyFrame>
+ </Animation>
+ </Style.Animations>
+ </Style>
+ <Style Selector="Border#PART_MainBorder:not(.IsActive)">
+ <Style.Animations>
+ <Animation Duration="0:0:0.2" Easing="{StaticResource FluentEasing}" FillMode="Both">
+ <KeyFrame Cue="100%">
+ <Setter Property="(TranslateTransform.Y)" Value="0" />
+ </KeyFrame>
+ </Animation>
+ </Style.Animations>
+ </Style>
</UserControl.Styles>
- <Border
+ <Border Name="PART_MainBorder"
+ Classes.IsActive="{Binding IsActive}"
TextBlock.FontFamily="{StaticResource MonospacedFont}"
- Padding="20 10" CornerRadius="4 4 0 0" BorderThickness="1 1 1 0" Background="#19FFFFFF" BorderBrush="#3CFFFFFF">
+ Padding="20 10" CornerRadius="4 4 0 0" BorderThickness="1 1 1 0" Background="#19FFFFFF"
+ BorderBrush="#3CFFFFFF">
<StackPanel Orientation="Horizontal" Spacing="20">
<TextBlock Text="Round in progress" />

Add hide/show animation for MusicControls