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;
@@ -166,8 +165,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
//DEPENDENCY PROPERTIES
#region Icon property / IconSource dependency property
@@ -237,7 +234,7 @@ 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)
{
@@ -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)
{
@@ -435,7 +432,7 @@ 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)
{
@@ -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)
{
@@ -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,7 +824,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayLeftMouseDown Routed Event
/// </summary>
public static readonly RoutedEvent TrayLeftMouseDownEvent = EventManager.RegisterRoutedEvent("TrayLeftMouseDown",
public static readonly RoutedEvent TrayLeftMouseDownEvent = EventManager.RegisterRoutedEvent(
"TrayLeftMouseDown",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -864,7 +868,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayRightMouseDown Routed Event
/// </summary>
public static readonly RoutedEvent TrayRightMouseDownEvent = EventManager.RegisterRoutedEvent("TrayRightMouseDown",
public static readonly RoutedEvent TrayRightMouseDownEvent =
EventManager.RegisterRoutedEvent("TrayRightMouseDown",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -905,7 +910,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayMiddleMouseDown Routed Event
/// </summary>
public static readonly RoutedEvent TrayMiddleMouseDownEvent = EventManager.RegisterRoutedEvent("TrayMiddleMouseDown",
public static readonly RoutedEvent TrayMiddleMouseDownEvent =
EventManager.RegisterRoutedEvent("TrayMiddleMouseDown",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -941,7 +947,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayLeftMouseUp
/// <summary>
@@ -1029,7 +1034,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayMiddleMouseUp Routed Event
/// </summary>
public static readonly RoutedEvent TrayMiddleMouseUpEvent = EventManager.RegisterRoutedEvent("TrayMiddleMouseUp",
public static readonly RoutedEvent TrayMiddleMouseUpEvent = EventManager.RegisterRoutedEvent(
"TrayMiddleMouseUp",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -1065,13 +1071,13 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayMouseDoubleClick
/// <summary>
/// TrayMouseDoubleClick Routed Event
/// </summary>
public static readonly RoutedEvent TrayMouseDoubleClickEvent = EventManager.RegisterRoutedEvent("TrayMouseDoubleClick",
public static readonly RoutedEvent TrayMouseDoubleClickEvent =
EventManager.RegisterRoutedEvent("TrayMouseDoubleClick",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -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,13 +1156,13 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayBalloonTipShown
/// <summary>
/// TrayBalloonTipShown Routed Event
/// </summary>
public static readonly RoutedEvent TrayBalloonTipShownEvent = EventManager.RegisterRoutedEvent("TrayBalloonTipShown",
public static readonly RoutedEvent TrayBalloonTipShownEvent =
EventManager.RegisterRoutedEvent("TrayBalloonTipShown",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -1197,7 +1203,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayBalloonTipClosed Routed Event
/// </summary>
public static readonly RoutedEvent TrayBalloonTipClosedEvent = EventManager.RegisterRoutedEvent("TrayBalloonTipClosed",
public static readonly RoutedEvent TrayBalloonTipClosedEvent =
EventManager.RegisterRoutedEvent("TrayBalloonTipClosed",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -1238,7 +1245,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// TrayBalloonTipClicked Routed Event
/// </summary>
public static readonly RoutedEvent TrayBalloonTipClickedEvent = EventManager.RegisterRoutedEvent("TrayBalloonTipClicked",
public static readonly RoutedEvent TrayBalloonTipClickedEvent =
EventManager.RegisterRoutedEvent("TrayBalloonTipClicked",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -1274,13 +1282,13 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayContextMenuOpen (and PreviewTrayContextMenuOpen)
/// <summary>
/// TrayContextMenuOpen Routed Event
/// </summary>
public static readonly RoutedEvent TrayContextMenuOpenEvent = EventManager.RegisterRoutedEvent("TrayContextMenuOpen",
public static readonly RoutedEvent TrayContextMenuOpenEvent =
EventManager.RegisterRoutedEvent("TrayContextMenuOpen",
RoutingStrategy.Bubble, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -1317,7 +1325,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// PreviewTrayContextMenuOpen Routed Event
/// </summary>
public static readonly RoutedEvent PreviewTrayContextMenuOpenEvent = EventManager.RegisterRoutedEvent("PreviewTrayContextMenuOpen",
public static readonly RoutedEvent PreviewTrayContextMenuOpenEvent =
EventManager.RegisterRoutedEvent("PreviewTrayContextMenuOpen",
RoutingStrategy.Tunnel, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -1395,7 +1404,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// PreviewTrayPopupOpen Routed Event
/// </summary>
public static readonly RoutedEvent PreviewTrayPopupOpenEvent = EventManager.RegisterRoutedEvent("PreviewTrayPopupOpen",
public static readonly RoutedEvent PreviewTrayPopupOpenEvent =
EventManager.RegisterRoutedEvent("PreviewTrayPopupOpen",
RoutingStrategy.Tunnel, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -1431,7 +1441,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
#region TrayToolTipOpen (and PreviewTrayToolTipOpen)
/// <summary>
@@ -1474,7 +1483,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// PreviewTrayToolTipOpen Routed Event
/// </summary>
public static readonly RoutedEvent PreviewTrayToolTipOpenEvent = EventManager.RegisterRoutedEvent("PreviewTrayToolTipOpen",
public static readonly RoutedEvent PreviewTrayToolTipOpenEvent =
EventManager.RegisterRoutedEvent("PreviewTrayToolTipOpen",
RoutingStrategy.Tunnel, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -1552,7 +1562,8 @@ namespace Hardcodet.Wpf.TaskbarNotification
/// <summary>
/// PreviewTrayToolTipClose Routed Event
/// </summary>
public static readonly RoutedEvent PreviewTrayToolTipCloseEvent = EventManager.RegisterRoutedEvent("PreviewTrayToolTipClose",
public static readonly RoutedEvent PreviewTrayToolTipCloseEvent =
EventManager.RegisterRoutedEvent("PreviewTrayToolTipClose",
RoutingStrategy.Tunnel, typeof (RoutedEventHandler), typeof (TaskbarIcon));
/// <summary>
@@ -1588,7 +1599,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
//ATTACHED EVENTS
#region PopupOpened
@@ -1811,8 +1821,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
//ATTACHED PROPERTIES
#region ParentTaskbarIcon
@@ -1849,7 +1857,6 @@ namespace Hardcodet.Wpf.TaskbarNotification
#endregion
//BASE CLASS PROPERTY OVERRIDES
/// <summary>
@@ -1858,7 +1865,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
static TaskbarIcon()
{
//register change listener for the Visibility property
PropertyMetadata md = new PropertyMetadata(Visibility.Visible, VisibilityPropertyChanged);
var md = new PropertyMetadata(Visibility.Visible, VisibilityPropertyChanged);
VisibilityProperty.OverrideMetadata(typeof (TaskbarIcon), md);
//register change listener for the DataContext property
@@ -1869,7 +1876,5 @@ namespace Hardcodet.Wpf.TaskbarNotification
md = new FrameworkPropertyMetadata(new PropertyChangedCallback(ContextMenuPropertyChanged));
ContextMenuProperty.OverrideMetadata(typeof (TaskbarIcon), md);
}
}
}