Notification.Icon Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the current icon for the message balloon on the title bar.

Namespace:  Microsoft.WindowsCE.Forms
Assembly:  Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)

public Icon Icon { get; set; }

Property Value

Type: System.Drawing.Icon
An Icon. There is no default value.

You can provide an icon file in your project either as content or as an embedded resource. To do this in Visual Studio, in the Solution Explorer, set the Build Action property of the icon file to either Content or Embedded Resource.

The recommended value for both the height and width of the icon is 16 pixels.

The following code example creates a notification and initializes a new instance of the Icon class using a data stream from an assembly resource. This code example is part of a larger example provided for the Notification class.


 // Provide an icon for the notification to appear in the title bar when dismissed.
 // Assumes an icon file is compiled with the assembly as an embedded resource.
Assembly asm = Assembly.GetExecutingAssembly();
notification1.Icon = new Icon(asm.GetManifestResourceStream("notify.ico"),16,16);


Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Compact Framework

Supported in: 3.5, 2.0
Show: