Notification Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Implements Windows CE functionality for displaying and responding to user notifications.
Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)
This class provides a managed implementation of the Windows CE notification functions. This class is supported only on the Pocket PC.
You can create notifications and then display them as needed using the Visible property. The InitialDuration property sets the time the message balloon initially displays. If you set InitialDuration to zero and Visible to true, the message balloon does not appear but its icon is available in the title bar for reactivation when clicked. The BalloonChanged event occurs whenever the balloon is shown or hidden, either programmatically using the Visible property or through user interaction.
In addition to plain text, you can create a user notification with HTML content in the message balloon. The HTML is rendered by the Pocket PC HTML control, and you can respond to values in an HTML form by parsing a response string provided by the ResponseSubmittedEventArgs class, through the Response property.
Cmd:2 Identifier
The identifier "cmd:2" has a special purpose in Windows CE and is used to dismiss notifications. If cmd:2 is the name of an HTML button or other element in a message balloon, the ResponseSubmitted event is not raised. The notification is dismissed, but its icon is placed on the title bar to be responded to at a later time.
Note |
|---|
If a link or element has a name of "cmd:n", where n is any integer, the ResponseSubmitted event is not raised. However, it is recommended to use only cmd:2 as an identifier for dismissing notifications. |
The following code example shows how to display a notification and gather user input using HTML elements in the message balloon. This example uses a button to display the notification; however, notifications usually occur as a result of an event or process, such as a timer.
The scenario for this example is a notification to confirm downloading data to the device. The message balloon has the following elements:
SELECT list
Hyperlink
Check box
Submit button
Button named with cmd:2 identifier
System::MarshalByRefObject
System.ComponentModel::Component
Microsoft.WindowsCE.Forms::Notification
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.
Note