AppNotificationTextProperties Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the AppNotificationTextProperties class, which specifies display and localization properties for the text.
public:
AppNotificationTextProperties();
AppNotificationTextProperties();
public AppNotificationTextProperties();
function AppNotificationTextProperties()
Public Sub New ()
Examples
The following example demonstrates adding a text block to the XML payload for an app notification.
var notification = new AppNotificationBuilder()
.AddText("Notification text.", new AppNotificationTextProperties().SetMaxLines(2))
.BuildNotification();
AppNotificationManager.Default.Show(notification);
The resulting XML payload:
<toast>
<visual>
<binding template='ToastGeneric'>
<text hint-maxLines='2'>Notification text.</text>
</binding>
</visual>
</toast>
Remarks
Add text with text properties to an app notification by calling AppNotificationBuilder.AddText).