Add Receive view copy button animation
MODIFY
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressView.axaml
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressView.axaml
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:behaviors="using:WalletWasabi.Fluent.Behaviors"
+ xmlns:i="using:Avalonia.Xaml.Interactivity"
+ xmlns:ia="using:Avalonia.Xaml.Interactions.Core"
xmlns:receive="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Receive"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="receive:ReceiveAddressViewModel"
<Style Selector="Button:pointerover > PathIcon">
<Setter Property="Opacity" Value="0.75" />
</Style>
+ <Style Selector="PathIcon.show">
+ <Setter Property="IsVisible" Value="True" />
+ </Style>
+ <Style Selector="PathIcon.hide">
+ <Setter Property="IsVisible" Value="False" />
+ </Style>
+ <Style Selector="PathIcon.toggleHide">
+ <Style.Animations>
+ <Animation Duration="0:0:2.0">
+ <KeyFrame Cue="0%">
+ <Setter Property="Opacity" Value="0.75" />
+ </KeyFrame>
+ <KeyFrame Cue="25%">
+ <Setter Property="Opacity" Value="0.0" />
+ <Setter Property="IsVisible" Value="False" />
+ </KeyFrame>
+ <KeyFrame Cue="75%">
+ <Setter Property="IsVisible" Value="True" />
+ </KeyFrame>
+ <KeyFrame Cue="100%">
+ <Setter Property="Opacity" Value="0.75" />
+ </KeyFrame>
+ </Animation>
+ </Style.Animations>
+ </Style>
+ <Style Selector="PathIcon.toggleShow">
+ <Style.Animations>
+ <Animation Delay="0:0:0.5" Duration="0:0:1.0">
+ <KeyFrame Cue="0%">
+ <Setter Property="Opacity" Value="0.0" />
+ <Setter Property="IsVisible" Value="True" />
+ </KeyFrame>
+ <KeyFrame Cue="50%">
+ <Setter Property="Opacity" Value="0.75" />
+ </KeyFrame>
+ <KeyFrame Cue="70%">
+ <Setter Property="Opacity" Value="0.75" />
+ </KeyFrame>
+ <KeyFrame Cue="75%">
+ <Setter Property="Opacity" Value="0.3" />
+ </KeyFrame>
+ <KeyFrame Cue="100%">
+ <Setter Property="Opacity" Value="0.0" />
+ <Setter Property="IsVisible" Value="False" />
+ </KeyFrame>
+ </Animation>
+ </Style.Animations>
+ </Style>
</UserControl.Styles>
<c:ContentArea Title="{Binding Title}"
EnableNext="True" NextContent="OK"
<PathIcon Data="{StaticResource share_regular}"/>
</Button>
<Button Margin="10 0 0 0" ToolTip.Tip="Copy" DockPanel.Dock="Right" Classes="plain" Command="{Binding CopyAddressCommand}">
- <PathIcon Data="{StaticResource copy_regular}"/>
+ <i:Interaction.Behaviors>
+ <ia:EventTriggerBehavior EventName="Click">
+ <behaviors:AddClassAction StyledElement="{Binding #PathCopy}" ClassName="toggleHide"/>
+ <behaviors:AddClassAction StyledElement="{Binding #PathCopied}" ClassName="toggleShow"/>
+ </ia:EventTriggerBehavior>
+ </i:Interaction.Behaviors>
+ <Panel>
+ <PathIcon Classes="show" Name="PathCopy" Data="{StaticResource copy_regular}"/>
+ <PathIcon Classes="hide" Name="PathCopied" Data="{StaticResource privacy_strong}"/>
+ </Panel>
</Button>
<TextBlock Text="{Binding Address}" FontWeight="Normal" FontSize="{StaticResource FontSizeH5}" />
</DockPanel>

Add Receive view copy button animation