diff --git a/samples/ControlCatalog/ViewModels/NotificationViewModel.cs b/samples/ControlCatalog/ViewModels/NotificationViewModel.cs index 4ce41b5566..c444147d1f 100644 --- a/samples/ControlCatalog/ViewModels/NotificationViewModel.cs +++ b/samples/ControlCatalog/ViewModels/NotificationViewModel.cs @@ -1,12 +1,23 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System.Reactive; +using Avalonia.Controls.Notifications; +using ReactiveUI; namespace ControlCatalog.ViewModels { public class NotificationViewModel { + public NotificationViewModel() + { + OKCommand = ReactiveCommand.Create(() => + { + NotificationManager.Instance.Show("Notification Accepted", "Main"); + }); + } + public string Title { get; set; } public string Message { get; set; } + + public ReactiveCommand OKCommand { get; } + } } diff --git a/samples/ControlCatalog/Views/NotificationView.xaml b/samples/ControlCatalog/Views/NotificationView.xaml index 45210a338c..be0a613c57 100644 --- a/samples/ControlCatalog/Views/NotificationView.xaml +++ b/samples/ControlCatalog/Views/NotificationView.xaml @@ -2,19 +2,15 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="ControlCatalog.Views.NotificationView"> - - - - - - + + - + -