AppNotificationTextProperties 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
텍스트의 표시 및 지역화 속성을 지정하는 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호출하여 텍스트 속성이 있는 텍스트를 앱 알림에 추가합니다.