Notification.Text 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 text for the message balloon.

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

Syntax

'Declaration
Public Property Text As String
    Get
    Set
'Usage
Dim instance As Notification
Dim value As String

value = instance.Text

instance.Text = value
public string Text { get; set; }
public:
property String^ Text {
    String^ get ();
    void set (String^ value);
}
member Text : string with get, set

Property Value

Type: System.String
A string containing the HTML or plain text. The default is an empty string ("").

Remarks

The text can be plain text or HTML. The Pocket PC HTML control renders the HTML to be the best of its ability. The following elements are unsupported and ignored:

  • BGSOUND tag

  • images

  • meta tags

  • script

Use the Caption property to modify the title of the message balloon.

Examples

The following code example creates an HTML string using a StringBuilder for the value of Text property. This code example is part of a larger example provided for the Notification class.


' Create the text for the notification.
' Use a StringBuilder for better performance.
Dim HTMLString As New StringBuilder()

HTMLString.Append("<html><body>")
HTMLString.Append("<font color=""#0000FF""><b>Data ready to download</b></font>")
HTMLString.Append("&nbsp;&nbsp;&nbsp;&nbsp;<a href=""settings"">Settings</a>")
HTMLString.Append("<br><form method=""GET"" action=notify>")
HTMLString.Append("<SELECT NAME=""lstbx"">")
HTMLString.Append("<OPTION VALUE=""0"">Start now</OPTION><OPTION VALUE=""1"">In 1 hr</OPTION>")
HTMLString.Append("<OPTION VALUE=""2"">In 2 hrs</OPTION><OPTION VALUE=""3"">In 3 hrs</OPTION>")
HTMLString.Append("<OPTION VALUE=""4"">In 4 hrs</OPTION></SELECT>")
HTMLString.Append("<input type=checkbox name=chkbx>Notify completion")
HTMLString.Append("<br><input type='submit'>")
HTMLString.Append("<input type=button name='cmd:2' value='Postpone'>")
HTMLString.Append("</body></html>")

' Set the Text property to the HTML string.
Notification1.Text = HTMLString.ToString()
// Create the text for the notification.
// Use a StringBuilder for better performance.
StringBuilder HTMLString = new StringBuilder();

HTMLString.Append("<html><body>");
HTMLString.Append("<font color=\"#0000FF\"><b>Data ready to download</b></font>");
HTMLString.Append("&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"settings\">Settings</a>");
HTMLString.Append("<br><form method=\"GET\" action=notify>");
HTMLString.Append("<SELECT NAME=\"lstbx\">");
HTMLString.Append("<OPTION VALUE=\"0\">Start now</OPTION><OPTION VALUE=\"1\">In 1 hr</OPTION>");
HTMLString.Append("<OPTION VALUE=\"2\">In 2 hrs</OPTION><OPTION VALUE=\"3\">In 3 hrs</OPTION>");
HTMLString.Append("<OPTION VALUE=\"4\">In 4 hrs</OPTION></SELECT>");
HTMLString.Append("<input type=checkbox name=chkbx>Notify completion");
HTMLString.Append("<br><input type='submit'>");
HTMLString.Append("<input type=button name='cmd:2' value='Postpone'>");
HTMLString.Append("</body></html>");

// Set the Text property to the HTML string.
notification1.Text = HTMLString.ToString();

.NET Framework Security

Platforms

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.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Notification Class

Notification Members

Microsoft.WindowsCE.Forms Namespace