Files
modernkeepass/ModernKeePass10/Actions/ToastAction.cs
Geoffroy BONNEVILLE 56d93a5187 Moved application code to the Application layer
Imported Win10 project
Code cleanup
WIP - Use common UWP services for Win8.1 and Win10
2020-04-06 20:20:45 +02:00

33 lines
1.0 KiB
C#

using Windows.UI.Xaml;
using Microsoft.Xaml.Interactivity;
using ModernKeePass.Common;
namespace ModernKeePass.Actions
{
public class ToastAction : DependencyObject, IAction
{
public string Title
{
get => (string)GetValue(TitleProperty);
set => SetValue(TitleProperty, value);
}
public static readonly DependencyProperty TitleProperty =
DependencyProperty.Register("Title", typeof(string), typeof(ToastAction), new PropertyMetadata(string.Empty));
public string Message
{
get => (string)GetValue(MessageProperty);
set => SetValue(MessageProperty, value);
}
public static readonly DependencyProperty MessageProperty =
DependencyProperty.Register("Message", typeof(string), typeof(ToastAction), new PropertyMetadata(string.Empty));
public object Execute(object sender, object parameter)
{
ToastNotificationHelper.ShowGenericToast(Title, Message);
return null;
}
}
}