NotifyIcon WPF

--------------
CHG   Merged partial classes of TaskbarIcon - no only 2 files.
ADD   Added attached events that indicate an opened popup/tooltip
ADD   Added storyboards in samples that make use of attached events.

git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@56 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
Philipp Sumi
2009-04-01 07:34:50 +00:00
parent 354ba1ca43
commit 1242596214
8 changed files with 682 additions and 618 deletions

View File

@@ -10,6 +10,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Hardcodet.Wpf.TaskbarNotification;
namespace Sample_Project
{
@@ -27,7 +28,7 @@ namespace Sample_Project
DependencyProperty.Register("InfoText",
typeof (string),
typeof (FancyToolTip),
new FrameworkPropertyMetadata("", InfoTextPropertyChanged));
new FrameworkPropertyMetadata(""));
/// <summary>
/// A property wrapper for the <see cref="InfoTextProperty"/>
@@ -40,34 +41,6 @@ namespace Sample_Project
set { SetValue(InfoTextProperty, value); }
}
/// <summary>
/// A static callback listener which is being invoked if the
/// <see cref="InfoTextProperty"/> dependency property has
/// been changed. Invokes the <see cref="OnInfoTextPropertyChanged"/>
/// instance method of the changed instance.
/// </summary>
/// <param name="d">The currently processed owner of the property.</param>
/// <param name="e">Provides information about the updated property.</param>
private static void InfoTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
FancyToolTip owner = (FancyToolTip) d;
owner.OnInfoTextPropertyChanged(e);
}
/// <summary>
/// Handles changes of the <see cref="InfoTextProperty"/> dependency property. As
/// WPF internally uses the dependency property system and bypasses the
/// <see cref="InfoText"/> property wrapper, updates of the property's value
/// should be handled here.
/// </summary
/// <param name="e">Provides information about the updated property.</param>
private void OnInfoTextPropertyChanged(DependencyPropertyChangedEventArgs e)
{
// string newValue = (string) e.NewValue;
}
#endregion
@@ -76,5 +49,6 @@ namespace Sample_Project
{
this.InitializeComponent();
}
}
}