Compartir a través de


AppNotificationTextProperties Constructor

Definición

Inicializa una nueva instancia de la clase AppNotificationTextProperties , que especifica las propiedades de visualización y localización del texto.

public:
 AppNotificationTextProperties();
 AppNotificationTextProperties();
public AppNotificationTextProperties();
function AppNotificationTextProperties()
Public Sub New ()

Ejemplos

En el ejemplo siguiente se muestra cómo agregar un bloque de texto a la carga XML para una notificación de aplicación.

var notification = new AppNotificationBuilder()
    .AddText("Notification text.", new AppNotificationTextProperties().SetMaxLines(2))
    .BuildNotification();

AppNotificationManager.Default.Show(notification);

La carga XML resultante:

<toast>
    <visual>
        <binding template='ToastGeneric'>
            <text hint-maxLines='2'>Notification text.</text>
        </binding>
    </visual>
</toast>

Comentarios

Agregue texto con propiedades de texto a una notificación de aplicación llamando a AppNotificationBuilder.AddText.

Se aplica a