add Notification
This commit is contained in:
1 parent
436f5d076b
commit
a4e80e288d
30 files changed
+440
-78
No files matched your search
@@ -7,7 +7,7 @@ using GalaSoft.MvvmLight.CommandWpf;
|
||||
#endif
|
||||
using HandyControl.Tools.Extension;
|
||||
|
||||
namespace HandyControlDemo.ViewModel.Basic
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class InteractiveDialogViewModel : ViewModelBase, IDialogResultable<string>
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using GalaSoft.MvvmLight.Command;
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
#endif
|
||||
|
||||
namespace HandyControlDemo.ViewModel.Controls
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class BadgeDemoViewModel : ViewModelBase
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ using HandyControl.Controls;
|
||||
using HandyControl.Tools.Extension;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.UserControl;
|
||||
using HandyControlDemo.ViewModel.Basic;
|
||||
using HandyControlDemo.Window;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControlDemo.UserControl;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class NotificationDemoViewModel : ViewModelBase
|
||||
{
|
||||
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(() => Notification.Show(new AppNotification(), ShowAnimation, StaysOpen))).Value;
|
||||
|
||||
private ShowAnimation _showAnimation;
|
||||
|
||||
public ShowAnimation ShowAnimation
|
||||
{
|
||||
get => _showAnimation;
|
||||
set => Set(ref _showAnimation, value);
|
||||
}
|
||||
|
||||
private bool _staysOpen = true;
|
||||
|
||||
public bool StaysOpen
|
||||
{
|
||||
get => _staysOpen;
|
||||
set => Set(ref _staysOpen, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using HandyControl.Controls;
|
||||
using HandyControlDemo.UserControl;
|
||||
#if netle40
|
||||
@@ -8,9 +7,9 @@ using GalaSoft.MvvmLight.Command;
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
|
||||
namespace HandyControlDemo
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class SpriteDemoViewModel : ViewModelBase
|
||||
public class SpriteDemoViewModel
|
||||
{
|
||||
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(()=> Sprite.Show(new AppSprite()))).Value;
|
||||
|
||||
@@ -4,8 +4,6 @@ using CommonServiceLocator;
|
||||
using GalaSoft.MvvmLight.Ioc;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.Service;
|
||||
using HandyControlDemo.ViewModel.Basic;
|
||||
using HandyControlDemo.ViewModel.Controls;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
@@ -40,6 +38,7 @@ namespace HandyControlDemo.ViewModel
|
||||
SimpleIoc.Default.Register<NoUserViewModel>();
|
||||
SimpleIoc.Default.Register<CardDemoViewModel>();
|
||||
SimpleIoc.Default.Register<SpriteDemoViewModel>();
|
||||
SimpleIoc.Default.Register<NotificationDemoViewModel>();
|
||||
}
|
||||
|
||||
public static ViewModelLocator Instance => new Lazy<ViewModelLocator>(() =>
|
||||
@@ -93,6 +92,8 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
public SpriteDemoViewModel SpriteDemo => ServiceLocator.Current.GetInstance<SpriteDemoViewModel>();
|
||||
|
||||
public NotificationDemoViewModel NotificationDemo => ServiceLocator.Current.GetInstance<NotificationDemoViewModel>();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user