mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-14 10:00:10 -05:00
-------------- ADD Added ParentTaskbarIcon attached dependency property which is set for tooltips, popups, and custom balloons. CHG Made CloseBalloon public. CHG Changed sample, cleaned up commands pattern. git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@93 9f600761-6f11-4665-b6dc-0185e9171623
27 lines
547 B
C#
27 lines
547 B
C#
using System.Windows;
|
|
using System.Windows.Input;
|
|
|
|
namespace Sample_Project.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;
|
|
}
|
|
|
|
|
|
}
|
|
}
|