CHG Added missing designer attributes to some properties. Reformatted code.

(NTFY-21)

git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@181 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
Philipp Sumi
2013-11-17 14:17:40 +00:00
parent c261d99378
commit 6d505b1580

View File

@@ -22,7 +22,6 @@
// THIS COPYRIGHT NOTICE MAY NOT BE REMOVED FROM THIS FILE
using System;
using System.ComponentModel;
using System.Drawing;
@@ -55,7 +54,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// TrayPopupResolved Read-Only Dependency Property
/// </summary>
private static readonly DependencyPropertyKey TrayPopupResolvedPropertyKey
= DependencyProperty.RegisterReadOnly("TrayPopupResolved", typeof(Popup), typeof(TaskbarIcon),
= DependencyProperty.RegisterReadOnly("TrayPopupResolved", typeof (Popup), typeof (TaskbarIcon),
new FrameworkPropertyMetadata(null));
@@ -76,7 +75,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
[Category(CategoryName)]
public Popup TrayPopupResolved
{
get { return (Popup)GetValue(TrayPopupResolvedProperty); }
get { return (Popup) GetValue(TrayPopupResolvedProperty); }
}
/// <summary>
@@ -97,8 +96,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// TrayToolTipResolved Read-Only Dependency Property
/// </summary>
private static readonly DependencyPropertyKey TrayToolTipResolvedPropertyKey
= DependencyProperty.RegisterReadOnly("TrayToolTipResolved", typeof(ToolTip), typeof(TaskbarIcon),
new FrameworkPropertyMetadata(null ));
= DependencyProperty.RegisterReadOnly("TrayToolTipResolved", typeof (ToolTip), typeof (TaskbarIcon),
new FrameworkPropertyMetadata(null));
/// <summary>
@@ -119,7 +118,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
[Bindable(true)]
public ToolTip TrayToolTipResolved
{
get { return (ToolTip)GetValue(TrayToolTipResolvedProperty); }
get { return (ToolTip) GetValue(TrayToolTipResolvedProperty); }
}
/// <summary>
@@ -140,7 +139,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// CustomBalloon Read-Only Dependency Property
/// </summary>
private static readonly DependencyPropertyKey CustomBalloonPropertyKey
= DependencyProperty.RegisterReadOnly("CustomBalloon", typeof(Popup), typeof(TaskbarIcon),
= DependencyProperty.RegisterReadOnly("CustomBalloon", typeof (Popup), typeof (TaskbarIcon),
new FrameworkPropertyMetadata(null));
public static readonly DependencyProperty CustomBalloonProperty
@@ -152,7 +151,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// </summary>
public Popup CustomBalloon
{
get { return (Popup)GetValue(CustomBalloonProperty); }
get { return (Popup) GetValue(CustomBalloonProperty); }
}
/// <summary>
@@ -166,8 +165,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
//DEPENDENCY PROPERTIES
#region Icon property / IconSource dependency property
@@ -199,8 +196,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// </summary>
public static readonly DependencyProperty IconSourceProperty =
DependencyProperty.Register("IconSource",
typeof(ImageSource),
typeof(TaskbarIcon),
typeof (ImageSource),
typeof (TaskbarIcon),
new FrameworkPropertyMetadata(null, IconSourcePropertyChanged));
/// <summary>
@@ -212,7 +209,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
[Description("Sets the displayed taskbar icon.")]
public ImageSource IconSource
{
get { return (ImageSource)GetValue(IconSourceProperty); }
get { return (ImageSource) GetValue(IconSourceProperty); }
set { SetValue(IconSourceProperty, value); }
}
@@ -227,7 +224,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <param name="e">Provides information about the updated property.</param>
private static void IconSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
TaskbarIcon owner = (TaskbarIcon)d;
TaskbarIcon owner = (TaskbarIcon) d;
owner.OnIconSourcePropertyChanged(e);
}
@@ -237,11 +234,11 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// WPF internally uses the dependency property system and bypasses the
/// <see cref="IconSource"/> property wrapper, updates of the property's value
/// should be handled here.
/// </summary
/// </summary>
/// <param name="e">Provides information about the updated property.</param>
private void OnIconSourcePropertyChanged(DependencyPropertyChangedEventArgs e)
{
ImageSource newValue = (ImageSource)e.NewValue;
ImageSource newValue = (ImageSource) e.NewValue;
//resolving the ImageSource at design time is unlikely to work
if (!Util.IsDesignMode) Icon = newValue.ToIcon();
@@ -297,7 +294,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// WPF internally uses the dependency property system and bypasses the
/// <see cref="ToolTipText"/> property wrapper, updates of the property's value
/// should be handled here.
/// </summary
/// </summary>
/// <param name="e">Provides information about the updated property.</param>
private void OnToolTipTextPropertyChanged(DependencyPropertyChangedEventArgs e)
{
@@ -361,7 +358,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// WPF internally uses the dependency property system and bypasses the
/// <see cref="TrayToolTip"/> property wrapper, updates of the property's value
/// should be handled here.
/// </summary
/// </summary>
/// <param name="e">Provides information about the updated property.</param>
private void OnTrayToolTipPropertyChanged(DependencyPropertyChangedEventArgs e)
{
@@ -397,7 +394,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// </summary>
public static readonly DependencyProperty TrayPopupProperty =
DependencyProperty.Register("TrayPopup",
typeof(UIElement),
typeof (UIElement),
typeof (TaskbarIcon),
new FrameworkPropertyMetadata(null, TrayPopupPropertyChanged));
@@ -410,7 +407,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
[Description("Displayed as a Popup if the user clicks on the taskbar icon.")]
public UIElement TrayPopup
{
get { return (UIElement)GetValue(TrayPopupProperty); }
get { return (UIElement) GetValue(TrayPopupProperty); }
set { SetValue(TrayPopupProperty, value); }
}
@@ -435,21 +432,21 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// WPF internally uses the dependency property system and bypasses the
/// <see cref="TrayPopup"/> property wrapper, updates of the property's value
/// should be handled here.
/// </summary
/// </summary>
/// <param name="e">Provides information about the updated property.</param>
private void OnTrayPopupPropertyChanged(DependencyPropertyChangedEventArgs e)
{
if (e.OldValue != null)
{
//remove the taskbar icon reference from the previously used element
SetParentTaskbarIcon((DependencyObject)e.OldValue, null);
SetParentTaskbarIcon((DependencyObject) e.OldValue, null);
}
if (e.NewValue != null)
{
//set this taskbar icon as a reference to the new tooltip element
SetParentTaskbarIcon((DependencyObject)e.NewValue, this);
SetParentTaskbarIcon((DependencyObject) e.NewValue, this);
}
//create a pop
@@ -458,7 +455,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region MenuActivation dependency property
/// <summary>
@@ -515,7 +511,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region Visibility dependency property override
/// <summary>
@@ -538,7 +533,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// WPF internally uses the dependency property system and bypasses the
/// <see cref="Visibility"/> property wrapper, updates of the property's value
/// should be handled here.
/// </summary
/// </summary>
/// <param name="e">Provides information about the updated property.</param>
private void OnVisibilityPropertyChanged(DependencyPropertyChangedEventArgs e)
{
@@ -602,7 +597,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// WPF internally uses the dependency property system and bypasses the
/// <see cref="FrameworkElement.DataContext"/> property wrapper, updates of the property's value
/// should be handled here.
/// </summary
/// </summary>
/// <param name="e">Provides information about the updated property.</param>
private void OnDataContextPropertyChanged(DependencyPropertyChangedEventArgs e)
{
@@ -630,7 +625,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <param name="e">Provides information about the updated property.</param>
private static void ContextMenuPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
TaskbarIcon owner = (TaskbarIcon)d;
TaskbarIcon owner = (TaskbarIcon) d;
owner.OnContextMenuPropertyChanged(e);
}
@@ -646,13 +641,13 @@ namespace Hardcodet.Wpf.TaskbarNotification
if (e.OldValue != null)
{
//remove the taskbar icon reference from the previously used element
SetParentTaskbarIcon((DependencyObject)e.OldValue, null);
SetParentTaskbarIcon((DependencyObject) e.OldValue, null);
}
if (e.NewValue != null)
{
//set this taskbar icon as a reference to the new tooltip element
SetParentTaskbarIcon((DependencyObject)e.NewValue, this);
SetParentTaskbarIcon((DependencyObject) e.NewValue, this);
}
UpdateDataContext((ContextMenu) e.NewValue, null, DataContext);
@@ -660,8 +655,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region DoubleClickCommand dependency property
/// <summary>
@@ -680,6 +673,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// Associates a command that is being executed if the tray icon is being
/// double clicked.
/// </summary>
[Category(CategoryName)]
[Description("A command that is being executed if the tray icon is being double-clicked.")]
public ICommand DoubleClickCommand
{
get { return (ICommand) GetValue(DoubleClickCommandProperty); }
@@ -704,6 +699,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// dependency property:<br/>
/// Command parameter for the <see cref="DoubleClickCommand"/>.
/// </summary>
[Category(CategoryName)]
[Description("Parameter to submit to the DoubleClickCommand when the user double clicks on the NotifyIcon.")]
public object DoubleClickCommandParameter
{
get { return GetValue(DoubleClickCommandParameterProperty); }
@@ -728,6 +725,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// dependency property:<br/>
/// The target of the command that is fired if the notify icon is double clicked.
/// </summary>
[Category(CategoryName)]
[Description("The target of the command that is fired if the notify icon is double clicked.")]
public IInputElement DoubleClickCommandTarget
{
get { return (IInputElement) GetValue(DoubleClickCommandTargetProperty); }
@@ -736,8 +735,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region LeftClickCommand dependency property
/// <summary>
@@ -754,8 +751,10 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// A property wrapper for the <see cref="LeftClickCommandProperty"/>
/// dependency property:<br/>
/// Associates a command that is being executed if the tray icon is being
/// double clicked.
/// left-clicked.
/// </summary>
[Category(CategoryName)]
[Description("A command that is being executed if the tray icon is being left-clicked.")]
public ICommand LeftClickCommand
{
get { return (ICommand) GetValue(LeftClickCommandProperty); }
@@ -780,6 +779,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// dependency property:<br/>
/// Command parameter for the <see cref="LeftClickCommand"/>.
/// </summary>
[Category(CategoryName)]
[Description("The target of the command that is fired if the notify icon is clicked with the left mouse button."
)]
public object LeftClickCommandParameter
{
get { return GetValue(LeftClickCommandParameterProperty); }
@@ -804,6 +806,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// dependency property:<br/>
/// The target of the command that is fired if the notify icon is clicked.
/// </summary>
[Category(CategoryName)]
[Description("The target of the command that is fired if the notify icon is clicked with the left mouse button."
)]
public IInputElement LeftClickCommandTarget
{
get { return (IInputElement) GetValue(LeftClickCommandTargetProperty); }
@@ -812,8 +817,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
//EVENTS
#region TrayLeftMouseDown
@@ -821,8 +824,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayLeftMouseDown Routed Event
/// </summary>
public static readonly RoutedEvent TrayLeftMouseDownEvent = EventManager.RegisterRoutedEvent("TrayLeftMouseDown",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent TrayLeftMouseDownEvent = EventManager.RegisterRoutedEvent(
"TrayLeftMouseDown",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when the user presses the left mouse button.
@@ -864,8 +868,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayRightMouseDown Routed Event
/// </summary>
public static readonly RoutedEvent TrayRightMouseDownEvent = EventManager.RegisterRoutedEvent("TrayRightMouseDown",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent TrayRightMouseDownEvent =
EventManager.RegisterRoutedEvent("TrayRightMouseDown",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when the presses the right mouse button.
@@ -905,8 +910,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayMiddleMouseDown Routed Event
/// </summary>
public static readonly RoutedEvent TrayMiddleMouseDownEvent = EventManager.RegisterRoutedEvent("TrayMiddleMouseDown",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent TrayMiddleMouseDownEvent =
EventManager.RegisterRoutedEvent("TrayMiddleMouseDown",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when the user presses the middle mouse button.
@@ -941,14 +947,13 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayLeftMouseUp
/// <summary>
/// TrayLeftMouseUp Routed Event
/// </summary>
public static readonly RoutedEvent TrayLeftMouseUpEvent = EventManager.RegisterRoutedEvent("TrayLeftMouseUp",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when the user releases the left mouse button.
@@ -989,7 +994,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// TrayRightMouseUp Routed Event
/// </summary>
public static readonly RoutedEvent TrayRightMouseUpEvent = EventManager.RegisterRoutedEvent("TrayRightMouseUp",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when the user releases the right mouse button.
@@ -1029,8 +1034,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayMiddleMouseUp Routed Event
/// </summary>
public static readonly RoutedEvent TrayMiddleMouseUpEvent = EventManager.RegisterRoutedEvent("TrayMiddleMouseUp",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent TrayMiddleMouseUpEvent = EventManager.RegisterRoutedEvent(
"TrayMiddleMouseUp",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when the user releases the middle mouse button.
@@ -1065,14 +1071,14 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayMouseDoubleClick
/// <summary>
/// TrayMouseDoubleClick Routed Event
/// </summary>
public static readonly RoutedEvent TrayMouseDoubleClickEvent = EventManager.RegisterRoutedEvent("TrayMouseDoubleClick",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent TrayMouseDoubleClickEvent =
EventManager.RegisterRoutedEvent("TrayMouseDoubleClick",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when the user double-clicks the taskbar icon.
@@ -1115,7 +1121,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// TrayMouseMove Routed Event
/// </summary>
public static readonly RoutedEvent TrayMouseMoveEvent = EventManager.RegisterRoutedEvent("TrayMouseMove",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when the user moves the mouse over the taskbar icon.
@@ -1142,7 +1148,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
{
if (target == null) return null;
RoutedEventArgs args = new RoutedEventArgs();
var args = new RoutedEventArgs();
args.RoutedEvent = TrayMouseMoveEvent;
RoutedEventHelper.RaiseEvent(target, args);
return args;
@@ -1150,14 +1156,14 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayBalloonTipShown
/// <summary>
/// TrayBalloonTipShown Routed Event
/// </summary>
public static readonly RoutedEvent TrayBalloonTipShownEvent = EventManager.RegisterRoutedEvent("TrayBalloonTipShown",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent TrayBalloonTipShownEvent =
EventManager.RegisterRoutedEvent("TrayBalloonTipShown",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when a balloon ToolTip is displayed.
@@ -1197,8 +1203,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayBalloonTipClosed Routed Event
/// </summary>
public static readonly RoutedEvent TrayBalloonTipClosedEvent = EventManager.RegisterRoutedEvent("TrayBalloonTipClosed",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent TrayBalloonTipClosedEvent =
EventManager.RegisterRoutedEvent("TrayBalloonTipClosed",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when a balloon ToolTip was closed.
@@ -1238,8 +1245,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayBalloonTipClicked Routed Event
/// </summary>
public static readonly RoutedEvent TrayBalloonTipClickedEvent = EventManager.RegisterRoutedEvent("TrayBalloonTipClicked",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent TrayBalloonTipClickedEvent =
EventManager.RegisterRoutedEvent("TrayBalloonTipClicked",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Occurs when the user clicks on a balloon ToolTip.
@@ -1274,14 +1282,14 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayContextMenuOpen (and PreviewTrayContextMenuOpen)
/// <summary>
/// TrayContextMenuOpen Routed Event
/// </summary>
public static readonly RoutedEvent TrayContextMenuOpenEvent = EventManager.RegisterRoutedEvent("TrayContextMenuOpen",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent TrayContextMenuOpenEvent =
EventManager.RegisterRoutedEvent("TrayContextMenuOpen",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Bubbled event that occurs when the context menu of the taskbar icon is being displayed.
@@ -1317,8 +1325,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// PreviewTrayContextMenuOpen Routed Event
/// </summary>
public static readonly RoutedEvent PreviewTrayContextMenuOpenEvent = EventManager.RegisterRoutedEvent("PreviewTrayContextMenuOpen",
RoutingStrategy.Tunnel, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent PreviewTrayContextMenuOpenEvent =
EventManager.RegisterRoutedEvent("PreviewTrayContextMenuOpen",
RoutingStrategy.Tunnel, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Tunneled event that occurs when the context menu of the taskbar icon is being displayed.
@@ -1359,7 +1368,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// TrayPopupOpen Routed Event
/// </summary>
public static readonly RoutedEvent TrayPopupOpenEvent = EventManager.RegisterRoutedEvent("TrayPopupOpen",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Bubbled event that occurs when the custom popup is being opened.
@@ -1395,8 +1404,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// PreviewTrayPopupOpen Routed Event
/// </summary>
public static readonly RoutedEvent PreviewTrayPopupOpenEvent = EventManager.RegisterRoutedEvent("PreviewTrayPopupOpen",
RoutingStrategy.Tunnel, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent PreviewTrayPopupOpenEvent =
EventManager.RegisterRoutedEvent("PreviewTrayPopupOpen",
RoutingStrategy.Tunnel, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Tunneled event that occurs when the custom popup is being opened.
@@ -1431,14 +1441,13 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayToolTipOpen (and PreviewTrayToolTipOpen)
/// <summary>
/// TrayToolTipOpen Routed Event
/// </summary>
public static readonly RoutedEvent TrayToolTipOpenEvent = EventManager.RegisterRoutedEvent("TrayToolTipOpen",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Bubbled event that occurs when the custom ToolTip is being displayed.
@@ -1474,8 +1483,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// PreviewTrayToolTipOpen Routed Event
/// </summary>
public static readonly RoutedEvent PreviewTrayToolTipOpenEvent = EventManager.RegisterRoutedEvent("PreviewTrayToolTipOpen",
RoutingStrategy.Tunnel, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent PreviewTrayToolTipOpenEvent =
EventManager.RegisterRoutedEvent("PreviewTrayToolTipOpen",
RoutingStrategy.Tunnel, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Tunneled event that occurs when the custom ToolTip is being displayed.
@@ -1516,7 +1526,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// TrayToolTipClose Routed Event
/// </summary>
public static readonly RoutedEvent TrayToolTipCloseEvent = EventManager.RegisterRoutedEvent("TrayToolTipClose",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Bubbled event that occurs when a custom tooltip is being closed.
@@ -1552,8 +1562,9 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// PreviewTrayToolTipClose Routed Event
/// </summary>
public static readonly RoutedEvent PreviewTrayToolTipCloseEvent = EventManager.RegisterRoutedEvent("PreviewTrayToolTipClose",
RoutingStrategy.Tunnel, typeof(RoutedEventHandler), typeof(TaskbarIcon));
public static readonly RoutedEvent PreviewTrayToolTipCloseEvent =
EventManager.RegisterRoutedEvent("PreviewTrayToolTipClose",
RoutingStrategy.Tunnel, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Tunneled event that occurs when a custom tooltip is being closed.
@@ -1588,7 +1599,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
//ATTACHED EVENTS
#region PopupOpened
@@ -1597,7 +1607,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// PopupOpened Attached Routed Event
/// </summary>
public static readonly RoutedEvent PopupOpenedEvent = EventManager.RegisterRoutedEvent("PopupOpened",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Adds a handler for the PopupOpened attached event
@@ -1641,7 +1651,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// ToolTipOpened Attached Routed Event
/// </summary>
public static readonly RoutedEvent ToolTipOpenedEvent = EventManager.RegisterRoutedEvent("ToolTipOpened",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Adds a handler for the ToolTipOpened attached event
@@ -1685,7 +1695,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// ToolTipClose Attached Routed Event
/// </summary>
public static readonly RoutedEvent ToolTipCloseEvent = EventManager.RegisterRoutedEvent("ToolTipClose",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Adds a handler for the ToolTipClose attached event
@@ -1729,7 +1739,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// BalloonShowing Attached Routed Event
/// </summary>
public static readonly RoutedEvent BalloonShowingEvent = EventManager.RegisterRoutedEvent("BalloonShowing",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Adds a handler for the BalloonShowing attached event
@@ -1773,7 +1783,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// BalloonClosing Attached Routed Event
/// </summary>
public static readonly RoutedEvent BalloonClosingEvent = EventManager.RegisterRoutedEvent("BalloonClosing",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(TaskbarIcon));
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
/// Adds a handler for the BalloonClosing attached event
@@ -1811,8 +1821,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
//ATTACHED PROPERTIES
#region ParentTaskbarIcon
@@ -1835,7 +1843,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// </summary>
public static TaskbarIcon GetParentTaskbarIcon(DependencyObject d)
{
return (TaskbarIcon)d.GetValue(ParentTaskbarIconProperty);
return (TaskbarIcon) d.GetValue(ParentTaskbarIconProperty);
}
/// <summary>
@@ -1849,7 +1857,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
//BASE CLASS PROPERTY OVERRIDES
/// <summary>
@@ -1858,18 +1865,16 @@ namespace Hardcodet.Wpf.TaskbarNotification
static TaskbarIcon()
{
//register change listener for the Visibility property
PropertyMetadata md = new PropertyMetadata(Visibility.Visible, VisibilityPropertyChanged);
VisibilityProperty.OverrideMetadata(typeof(TaskbarIcon), md);
var md = new PropertyMetadata(Visibility.Visible, VisibilityPropertyChanged);
VisibilityProperty.OverrideMetadata(typeof (TaskbarIcon), md);
//register change listener for the DataContext property
md = new FrameworkPropertyMetadata(new PropertyChangedCallback(DataContextPropertyChanged));
DataContextProperty.OverrideMetadata(typeof(TaskbarIcon), md);
DataContextProperty.OverrideMetadata(typeof (TaskbarIcon), md);
//register change listener for the ContextMenu property
md = new FrameworkPropertyMetadata(new PropertyChangedCallback(ContextMenuPropertyChanged));
ContextMenuProperty.OverrideMetadata(typeof(TaskbarIcon), md);
ContextMenuProperty.OverrideMetadata(typeof (TaskbarIcon), md);
}
}
}