mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-15 09:45:36 -05:00
-------------- CHG Generally improved sample project - added more bindings, welcome balloon, changed layout. CHG Changed namespace in sample project. Preparing tutorials. git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@101 9f600761-6f11-4665-b6dc-0185e9171623
27 lines
540 B
C#
27 lines
540 B
C#
using System.Windows;
|
|
using System.Windows.Input;
|
|
|
|
namespace Samples.Commands
|
|
{
|
|
/// <summary>
|
|
/// Hides the main window.
|
|
/// </summary>
|
|
public class HideMainWindowCommand : CommandBase<HideMainWindowCommand>
|
|
{
|
|
|
|
public override void Execute(object parameter)
|
|
{
|
|
Application.Current.MainWindow.Hide();
|
|
CommandManager.InvalidateRequerySuggested();
|
|
}
|
|
|
|
|
|
public override bool CanExecute(object parameter)
|
|
{
|
|
return Application.Current.MainWindow.IsVisible;
|
|
}
|
|
|
|
|
|
}
|
|
}
|