notification style
MODIFY
WalletWasabi.Fluent/Behaviors/RegisterNotificationHostBehavior.cs
WalletWasabi.Fluent/Behaviors/RegisterNotificationHostBehavior.cs
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Notifications;
+using Avalonia.Xaml.Interactivity;
using WalletWasabi.Fluent.Helpers;
namespace WalletWasabi.Fluent.Behaviors
{
- public class RegisterNotificationHostBehavior : AttachedToVisualTreeBehavior<Window>
+ public class RegisterNotificationHostBehavior : Behavior<Window>
{
- protected override void OnAttachedToVisualTree()
+ protected override void OnAttached()
{
var notificationManager = new WindowNotificationManager(AssociatedObject)
{

MODIFY
WalletWasabi.Fluent/Helpers/NotificationHelpers.cs
WalletWasabi.Fluent/Helpers/NotificationHelpers.cs
@@ -5,6 +5,7 @@ namespace WalletWasabi.Fluent.Helpers
{
public static class NotificationHelpers
{
+ private const int DefaultNotificationTimeout = 7;
private static WindowNotificationManager? NotificationManager;
public static void SetNotificationManager(WindowNotificationManager windowNotificationManager)
@@ -21,7 +22,7 @@ namespace WalletWasabi.Fluent.Helpers
{
if (NotificationManager is { } nm)
{
- nm.Show(new Notification(title, message));
+ nm.Show(new Notification(title, message, NotificationType.Information, TimeSpan.FromSeconds(DefaultNotificationTimeout)));
}
}
}

MODIFY
WalletWasabi.Fluent/Styles/Themes/Base.axaml
WalletWasabi.Fluent/Styles/Themes/Base.axaml
<x:String x:Key="LabelsWatermarkText">i.e. Alice, Bob, Wasabi Inc, Exchange</x:String>
+ <StaticResource x:Key="NotificationCardInformationBackgroundBrush" ResourceKey="SystemAccentColor" />
</Styles.Resources>
</Styles>

MODIFY
WalletWasabi.Fluent/Styles/Themes/BaseDark.axaml
WalletWasabi.Fluent/Styles/Themes/BaseDark.axaml
<SolidColorBrush x:Key="PrivacySuggestionControlSelectedBackground">#353535</SolidColorBrush>
+ <SolidColorBrush x:Key="NotificationCardBackgroundBrush">#3D3D3D</SolidColorBrush>
+
<SolidColorBrush x:Key="TileRegionColor">#FF2B2B2B</SolidColorBrush>
<Color x:Key="RegionColor">#FF212121</Color>
<BoxShadows x:Key="BoxShadow">0 1 4 #121212</BoxShadows>

MODIFY
WalletWasabi.Fluent/Styles/Themes/BaseLight.axaml
WalletWasabi.Fluent/Styles/Themes/BaseLight.axaml
<SolidColorBrush x:Key="PrivacySuggestionControlSelectedBackground">#E1E1E1</SolidColorBrush>
+ <SolidColorBrush x:Key="NotificationCardBackgroundBrush">#EBEBEB</SolidColorBrush>
+
<SolidColorBrush x:Key="TileRegionColor">#FFFFFF</SolidColorBrush>
<Color x:Key="RegionColor">#FAFAFA</Color>
<BoxShadows x:Key="BoxShadow">0 1 4 #D1D1D1</BoxShadows>

MODIFY
WalletWasabi.Fluent/Views/MainWindow.axaml
WalletWasabi.Fluent/Views/MainWindow.axaml
xmlns:local="using:WalletWasabi.Fluent.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:behaviors="using:WalletWasabi.Fluent.Behaviors"
+ xmlns:i="using:Avalonia.Xaml.Interactivity"
mc:Ignorable="d" d:DesignWidth="536" d:DesignHeight="459"
x:Class="WalletWasabi.Fluent.Views.MainWindow"
x:Name="MainWindow"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="PreferSystemChrome"
Title="Wasabi Wallet"
- WindowState="{Binding WindowState, Mode=TwoWay}">
+ WindowState="{Binding WindowState, Mode=TwoWay}"
+ >
+ <i:Interaction.Behaviors>
+ <behaviors:RegisterNotificationHostBehavior/>
+ </i:Interaction.Behaviors>
<Panel Margin="{Binding #MainWindow.OffScreenMargin}">
<local:MainView />

notification style