FIX Adding missing sample command.

git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@212 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
Philipp Sumi
2013-11-23 18:22:31 +00:00
parent 0b73872f2b
commit 3f5fd9284e

View File

@@ -0,0 +1,24 @@
using System.Windows;
using System.Windows.Input;
namespace Samples.Commands
{
/// <summary>
/// Closes the current window.
/// </summary>
public class CloseWindowCommand : CommandBase<CloseWindowCommand>
{
public override void Execute(object parameter)
{
GetTaskbarWindow(parameter).Close();
CommandManager.InvalidateRequerySuggested();
}
public override bool CanExecute(object parameter)
{
Window win = GetTaskbarWindow(parameter);
return win != null;
}
}
}