Ghost1372

everything can be handy

Notification

Used to display a rich content message on the desktop.

1
public sealed class Notification : System.Windows.Window

Method

Name Description
Show(object, ShowAnimation, bool) Show desktop notifications (message content, animation effect type, whether to keep it open)

Case

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<Border x:Class="HandyControlDemo.UserControl.AppNotification"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="White"
BorderThickness="1"
BorderBrush="{DynamicResource BorderBrush}"
Width="320"
Height="518">
<hc:SimplePanel>
<Path Margin="0,36,0,0" VerticalAlignment="Top" Width="70" Height="70" Data="{StaticResource LogoGeometry}" Fill="#f06632"/>
<TextBlock Text="HandyControl" FontSize="30" Foreground="{StaticResource PrimaryBrush}" HorizontalAlignment="Center" Margin="0,122,0,0" VerticalAlignment="Top"/>
<Button Command="hc:ControlCommands.CloseWindow" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" Content="Close" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="10,0,10,10"/>
</hc:SimplePanel>
</Border>
1
2
3
4
5
6
7
8
9
10
namespace HandyControlDemo.UserControl
{
public partial class AppNotification
{
public AppNotification()
{
InitializeComponent();
}
}
}
1
Notification.Show(new AppNotification(), ShowAnimation.Fade, true)

Notification

0%