다음을 통해 공유


AppNotificationTextProperties 생성자

정의

텍스트의 표시 및 지역화 속성을 지정하는 AppNotificationTextProperties 클래스의 새 인스턴스를 초기화합니다.

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

예제

다음 예제에서는 앱 알림에 대한 XML 페이로드에 텍스트 블록을 추가하는 방법을 보여 줍니다.

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

AppNotificationManager.Default.Show(notification);

결과 XML 페이로드:

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

설명

AppNotificationBuilder.AddText호출하여 텍스트 속성이 있는 텍스트를 앱 알림에 추가합니다.

적용 대상