add isbusy on contentarea
MODIFY
WalletWasabi.Fluent/Controls/ContentArea.axaml
WalletWasabi.Fluent/Controls/ContentArea.axaml
<Design.PreviewWith>
<Panel Background="{DynamicResource RegionColor}">
<c:ContentArea Width="500" Height="300"
+ IsBusy="True"
Title="Add a Wallet"
EnableBack="True"
EnableCancel="True" CancelContent="Cancel" FocusCancel="False"
<Style Selector="c|ContentArea">
<Setter Property="Template">
<ControlTemplate>
- <DockPanel Margin="20,0,10,0">
+ <Panel>
+ <c:ProgressRing Name="LoadingRing" IsIndeterminate="True"/>
+ <DockPanel Name="MainDockPanel" Margin="20,0,10,0">
<StackPanel DockPanel.Dock="Top" Spacing="10" Margin="0 0 0 20">
<DockPanel>
<Button Margin="-20,0,0,0" Classes="plain" Command="{Binding BackCommand}" IsVisible="{TemplateBinding EnableBack}">
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
</ScrollViewer>
</DockPanel>
+ </Panel>
</ControlTemplate>
</Setter>
</Style>
+
<Style Selector="c|ContentArea /template/ ContentPresenter#PART_TitlePresenter">
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TextControlForeground}" />
<Setter Property="TextBlock.FontSize" Value="{DynamicResource FontSizeH3}" />
</Style>
+
<Style Selector="c|ContentArea :is(Control).caption TextBlock, c|ContentArea :is(TextBlock).caption">
<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
<Setter Property="FontSize" Value="{DynamicResource FontSizeH7}" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="Opacity" Value="0.6" />
</Style>
+
+ <Style Selector="c|ContentArea /template/ DockPanel#MainDockPanel">
+ <Setter Property="Transitions">
+ <Transitions>
+ <DoubleTransition Property="Opacity" Duration="3"/>
+ <TransformOperationsTransition Property="RenderTransform" Duration="3" Easing="QuadraticEaseIn" />
+ </Transitions>
+ </Setter>
+ </Style>
+
+ <Style Selector="c|ContentArea[IsBusy=True] /template/ DockPanel#MainDockPanel">
+ <Setter Property="Opacity" Value="0"/>
+ <Setter Property="RenderTransform" Value="scale(0.75)"/>
+ </Style>
+
+ <Style Selector="c|ContentArea[IsBusy=False] /template/ DockPanel#MainDockPanel">
+ <Setter Property="Opacity" Value="1"/>
+ <Setter Property="RenderTransform" Value="scale(1)"/>
+ </Style>
+
+ <Style Selector="c|ContentArea[IsBusy=True] /template/ c|ProgressRing#LoadingRing">
+ <Setter Property="Opacity" Value="1"/>
+ <Setter Property="RenderTransform" Value="scale(1)"/>
+ </Style>
+
+ <Style Selector="c|ContentArea[IsBusy=False] /template/ c|ProgressRing#LoadingRing">
+ <Setter Property="Opacity" Value="0"/>
+ <Setter Property="RenderTransform" Value="scale(0.75)"/>
+ </Style>
+
+ <Style Selector="c|ContentArea /template/ c|ProgressRing#LoadingRing">
+ <Setter Property="Transitions">
+ <Transitions>
+ <DoubleTransition Property="Opacity" Duration="3"/>
+ <TransformOperationsTransition Property="RenderTransform" Duration="3" Easing="QuadraticEaseIn" />
+ </Transitions>
+ </Setter>
+ </Style>
+
</Styles>

MODIFY
WalletWasabi.Fluent/Controls/ContentArea.axaml.cs
WalletWasabi.Fluent/Controls/ContentArea.axaml.cs
@@ -33,6 +33,9 @@ namespace WalletWasabi.Fluent.Controls
public static readonly StyledProperty<object> NextContentProperty =
AvaloniaProperty.Register<ContentArea, object>(nameof(NextContent), "Next");
+ public static readonly StyledProperty<bool> IsBusyProperty =
+ AvaloniaProperty.Register<ContentArea, bool>(nameof(IsBusy));
+
private IContentPresenter? _titlePresenter;
private IContentPresenter? _captionPresenter;
@@ -90,6 +93,12 @@ namespace WalletWasabi.Fluent.Controls
set => SetValue(NextContentProperty, value);
}
+ public bool IsBusy
+ {
+ get => GetValue(IsBusyProperty);
+ set => SetValue(IsBusyProperty, value);
+ }
+
protected override bool RegisterContentPresenter(IContentPresenter presenter)
{
var result = base.RegisterContentPresenter(presenter);

add isbusy on contentarea