Files
wpf-notifyicon/Source/Sample Project/Commands/ShowMainWindowCommand.cs
Philipp Sumi 2b05ff7bd7 WPF NotifyIcon
--------------
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
2009-05-03 07:10:30 +00:00

28 lines
622 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Input;
namespace Sample_Project.Commands
{
/// <summary>
/// Shows the main window.
/// </summary>
public class ShowMainWindowCommand : CommandBase<ShowMainWindowCommand>
{
public override void Execute(object parameter)
{
Application.Current.MainWindow.Show();
CommandManager.InvalidateRequerySuggested();
}
public override bool CanExecute(object parameter)
{
return Application.Current.MainWindow.IsVisible == false;
}
}
}