Skip to content

GamerVII-NET/GamerVII.Notification.Avalonia

 
 

Repository files navigation

GamerVII.Notification.Avalonia


image

For use:

  1. Add style in App.xaml
<Application.Styles>
        ...
    <StyleInclude Source="avares://GamerVII.Notification.Avalonia/Themes/Generic.xaml" />
</Application.Styles>
  1. Add notification panel in your window
 <Border Grid.Column="1">
       <controls:NotificationMessageContainer Manager="{Binding Manager}" />
 </Border>
  1. Bind manager from vm
 public INotificationMessageManager Manager { get; } = new NotificationMessageManager();
  1. Run notification
this.Manager
    .CreateMessage()
    .Accent("#1751C3")
    .Animates(true)
    .Background("#333")
    .HasBadge("Info")
    .HasMessage("Update will be installed on next application restart. This message will be dismissed after 5 seconds.")
    .Dismiss().WithDelay(TimeSpan.FromSeconds(5))
    .Queue();

or

this.Manager
     .CreateMessage(true, "#D03E3E", "Ошибка", "Укажите наименование клиента" )
     .Dismiss().WithDelay(TimeSpan.FromSeconds(2))
     .Queue();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%