Table of Contents

Class NotifyIcon

Namespace
HeBianGu.General.WpfControlLib
Assembly
HeBianGu.General.WpfControlLib.dll

Specifies a component that creates an icon in the notification area.

[UIPermission(SecurityAction.InheritanceDemand, Window = UIPermissionWindow.AllWindows)]
public sealed class NotifyIcon : FrameworkElement, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IDisposable, IAddChild, ICommandSource
Inheritance
NotifyIcon
Implements
Inherited Members
Extension Methods

Constructors

NotifyIcon()

Initializes a new instance of the NotifyIcon class.

[SecurityCritical]
public NotifyIcon()

Fields

BalloonTipClickEvent

Identifies the BalloonTipClick routed event.

public static readonly RoutedEvent BalloonTipClickEvent

Field Value

RoutedEvent

BalloonTipClosedEvent

Identifies the BalloonTipClosed routed event.

public static readonly RoutedEvent BalloonTipClosedEvent

Field Value

RoutedEvent

BalloonTipIconProperty

Identifies the BalloonTipIcon dependency property.

public static readonly DependencyProperty BalloonTipIconProperty

Field Value

DependencyProperty

BalloonTipShownEvent

Identifies the BalloonTipShown routed event.

public static readonly RoutedEvent BalloonTipShownEvent

Field Value

RoutedEvent

BalloonTipTextProperty

Identifies the BalloonTipText dependency property.

public static readonly DependencyProperty BalloonTipTextProperty

Field Value

DependencyProperty

BalloonTipTitleProperty

Identifies the BalloonTipTitle dependency property.

public static readonly DependencyProperty BalloonTipTitleProperty

Field Value

DependencyProperty

ClickEvent

Identifies the Click routed event.

public static readonly RoutedEvent ClickEvent

Field Value

RoutedEvent

CommandParameterProperty

public static readonly DependencyProperty CommandParameterProperty

Field Value

DependencyProperty

CommandProperty

public static readonly DependencyProperty CommandProperty

Field Value

DependencyProperty

DoubleClickEvent

Identifies the DoubleClick routed event.

public static readonly RoutedEvent DoubleClickEvent

Field Value

RoutedEvent

IconProperty

Identifies the Icon dependency property.

public static readonly DependencyProperty IconProperty

Field Value

DependencyProperty

IconVisibilityProperty

Identifies the IconVisibility dependency property.

public static readonly DependencyProperty IconVisibilityProperty

Field Value

DependencyProperty

MouseClickEvent

Identifies the MouseClick routed event.

public static readonly RoutedEvent MouseClickEvent

Field Value

RoutedEvent

MouseDoubleClickEvent

Identifies the MouseDoubleClick routed event.

public static readonly RoutedEvent MouseDoubleClickEvent

Field Value

RoutedEvent

NotifyClassProperty

public static readonly DependencyProperty NotifyClassProperty

Field Value

DependencyProperty

TextProperty

Identifies the Text dependency property.

public static readonly DependencyProperty TextProperty

Field Value

DependencyProperty

Properties

BalloonTipIcon

Gets or sets the icon to display on the balloon tip.

public NotifyBalloonIcon BalloonTipIcon { get; set; }

Property Value

NotifyBalloonIcon

The balloon tip icon.

BalloonTipText

Gets or sets the text to display on the balloon tip.

public string BalloonTipText { get; set; }

Property Value

string

The balloon tip text.

BalloonTipTitle

Gets or sets the title of the balloon tip.

public string BalloonTipTitle { get; set; }

Property Value

string

The balloon tip title.

Command

Gets the command that will be executed when the command source is invoked.

public ICommand Command { get; set; }

Property Value

ICommand

The command that will be executed when the command source is invoked.

CommandParameter

Represents a user defined data value that can be passed to the command when it is executed.

public object CommandParameter { get; set; }

Property Value

object

The command specific data.

CommandTarget

The object that the command is being executed on.

public IInputElement CommandTarget { get; set; }

Property Value

IInputElement

The object that the command is being executed on.

Icon

Gets or sets the icon.

public ImageSource Icon { get; set; }

Property Value

ImageSource

The icon.

IconVisibility

Gets or sets the notify icon's visibility.

public NotifyIconVisibility IconVisibility { get; set; }

Property Value

NotifyIconVisibility

Text

Gets or sets the tooltip text displayed when the mouse pointer rests on a notification area icon.

public string Text { get; set; }

Property Value

string

The text.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

~NotifyIcon()

Releases unmanaged resources and performs other cleanup operations before the NotifyIcon is reclaimed by garbage collection.

protected ~NotifyIcon()

ShowBalloonTip(int)

Displays a balloon tip in the taskbar for the specified time period.

[SecurityCritical]
public void ShowBalloonTip(int timeout)

Parameters

timeout int

The time period, in milliseconds, the balloon tip should display.

ShowBalloonTip(int, string, string, NotifyBalloonIcon)

Displays a balloon tip with the specified title, text, and icon in the taskbar for the specified time period.

[SecurityCritical]
public void ShowBalloonTip(int timeout, string tipTitle, string tipText, NotifyBalloonIcon tipIcon)

Parameters

timeout int

The time period, in milliseconds, the balloon tip should display.

tipTitle string

The title to display on the balloon tip.

tipText string

The text to display on the balloon tip.

tipIcon NotifyBalloonIcon

One of the NotifyBalloonIcon values.

ShowFlash()

public void ShowFlash()

Events

BalloonTipClick

Occurs when the balloon tip is clicked.

public event RoutedEventHandler BalloonTipClick

Event Type

RoutedEventHandler

BalloonTipClosed

Occurs when the balloon tip is closed by the user.

public event RoutedEventHandler BalloonTipClosed

Event Type

RoutedEventHandler

BalloonTipShown

Occurs when the balloon tip is displayed on the screen.

public event RoutedEventHandler BalloonTipShown

Event Type

RoutedEventHandler

Click

Occurs when the user clicks the icon in the notification area.

public event RoutedEventHandler Click

Event Type

RoutedEventHandler

DoubleClick

Occurs when the user double-clicks the icon in the notification area of the taskbar.

public event RoutedEventHandler DoubleClick

Event Type

RoutedEventHandler

MouseClick

Occurs when the user clicks a NotifyIcon with the mouse.

public event MouseButtonEventHandler MouseClick

Event Type

MouseButtonEventHandler

MouseDoubleClick

Occurs when the user double-clicks the NotifyIcon with the mouse.

public event MouseButtonEventHandler MouseDoubleClick

Event Type

MouseButtonEventHandler