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.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for