do not do fade in and out animation at a time
MODIFY
WalletWasabi.Fluent/Controls/PrivacyContentControl.axaml
WalletWasabi.Fluent/Controls/PrivacyContentControl.axaml
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:controls="using:WalletWasabi.Fluent.Controls"
- xmlns:conv="clr-namespace:WalletWasabi.Fluent.Converters">
+ xmlns:controls="using:WalletWasabi.Fluent.Controls">
<Design.PreviewWith>
<controls:PrivacyContentControl />
</Design.PreviewWith>
<ControlTemplate>
<Panel Background="Transparent">
<ContentPresenter Name="PART_Content"
- Opacity="{TemplateBinding IsContentVisible, Converter={x:Static conv:BoolOpacityConverters.BoolToOpacity}}"
- IsVisible="{Binding $self.Opacity, Converter={x:Static conv:BoolOpacityConverters.OpacityToBool}}"
+ IsVisible="{TemplateBinding IsContentVisible}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
<Panel Name="PART_PrivacyReplacement"
- Opacity="{TemplateBinding IsPrivacyContentVisible, Converter={x:Static conv:BoolOpacityConverters.BoolToOpacity}}"
- IsVisible="{Binding $self.Opacity, Converter={x:Static conv:BoolOpacityConverters.OpacityToBool}}">
+ IsVisible="{TemplateBinding IsPrivacyContentVisible}">
<Viewbox Name="PART_Icon">
<PathIcon Data="{StaticResource incognito_regular}" Opacity="0.15" />
</Viewbox>
<Setter Property="Margin" Value="25" />
</Style>
+ <!-- Transitions -->
<Style Selector="controls|PrivacyContentControl /template/ ContentPresenter#PART_Content,
controls|PrivacyContentControl /template/ Panel#PART_PrivacyReplacement">
<Setter Property="Transitions">
<Transitions>
- <DoubleTransition Property="Opacity" Duration="0:0:0.2" Easing="{StaticResource FluentEasing}" />
+ <DoubleTransition Property="Opacity" Duration="0:0:0.3" Easing="{StaticResource FluentEasing}" />
</Transitions>
</Setter>
</Style>
+ <Style Selector="controls|PrivacyContentControl /template/ ContentPresenter#PART_Content[IsVisible=True],
+ controls|PrivacyContentControl /template/ Panel#PART_PrivacyReplacement[IsVisible=True]">
+ <Setter Property="Opacity" Value="1" />
+ </Style>
+ <Style Selector="controls|PrivacyContentControl /template/ ContentPresenter#PART_Content[IsVisible=False],
+ controls|PrivacyContentControl /template/ Panel#PART_PrivacyReplacement[IsVisible=False]">
+ <Setter Property="Opacity" Value="0" />
+ </Style>
<Style Selector="controls|PrivacyContentControl.monoSpaced">
<Setter Property="FontFamily" Value="{StaticResource MonospacedFont}" />

do not do fade in and out animation at a time