WPF NotifyIcon

--------------
FIX   Removed debug output in WindowMessageSink.
CHG   Major rework on sample project.

git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@104 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
Philipp Sumi
2009-05-15 09:51:55 +00:00
parent af046cf7bf
commit 97ef369a02
47 changed files with 1405 additions and 107 deletions

View File

@@ -1,4 +1,6 @@
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
using System.Windows.Markup;
@@ -58,7 +60,18 @@ namespace Samples.Commands
/// </param>
public virtual bool CanExecute(object parameter)
{
return true;
return IsDesignMode ? false : true;
}
public static bool IsDesignMode
{
get
{
return (bool)
DependencyPropertyDescriptor.FromProperty(DesignerProperties.IsInDesignModeProperty, typeof(FrameworkElement))
.Metadata.DefaultValue;
}
}
}
}

View File

@@ -18,7 +18,7 @@ namespace Samples.Commands
public override bool CanExecute(object parameter)
{
return Application.Current.MainWindow.IsVisible;
return !IsDesignMode && Application.Current.MainWindow.IsVisible;
}

View File

@@ -20,7 +20,7 @@ namespace Samples.Commands
public override bool CanExecute(object parameter)
{
return Application.Current.MainWindow.IsVisible == false;
return !IsDesignMode && Application.Current.MainWindow.IsVisible == false;
}
}