다음을 통해 공유


AppNotificationBuilder.SetAttributionText 메서드

정의

오버로드

SetAttributionText(String, String)

앱 알림의 특성 텍스트를 설정합니다.

SetAttributionText(String)

앱 알림의 특성 텍스트를 설정합니다.

SetAttributionText(String, String)

앱 알림의 특성 텍스트를 설정합니다.

public:
 virtual AppNotificationBuilder ^ SetAttributionText(Platform::String ^ text, Platform::String ^ language) = SetAttributionText;
/// [Windows.Foundation.Metadata.Overload("SetAttributionText2")]
AppNotificationBuilder SetAttributionText(winrt::hstring const& text, winrt::hstring const& language);
[Windows.Foundation.Metadata.Overload("SetAttributionText2")]
public AppNotificationBuilder SetAttributionText(string text, string language);
function setAttributionText(text, language)
Public Function SetAttributionText (text As String, language As String) As AppNotificationBuilder

매개 변수

text
String

Platform::String

winrt::hstring

특성 텍스트입니다.

language
String

Platform::String

winrt::hstring

문자열은 특성 텍스트의 언어를 지정하는 IETF 언어 태그를 포함합니다.

반환

추가 메서드 호출을 연결할 수 있도록 AppNotificationBuilder instance 반환합니다.

특성

예제

var notification = new AppNotificationBuilder()
    .AddText("Notification text.")
    .SetAttributionText("Attribution text", "en-US")
    .BuildNotification();

AppNotificationManager.Default.Show(notification);

결과 XML 페이로드:

<toast>
    <visual>
        <binding template='ToastGeneric'>
            <text>Notification text.</text>
            <text placement='attribution' lang='en-US'>Attribution text</text>
        </binding>
    </visual>
</toast>

설명

다음 이미지는 앱 알림에 특성 텍스트의 배치를 보여줍니다.

재정의된 특성 텍스트가 있는 앱 알림의 스크린샷.

AppNotificationBuilder API를 사용하여 앱 알림에 대한 UI를 만드는 방법에 대한 지침은 앱 알림 콘텐츠를 참조하세요.

앱 알림에 대한 XML 스키마에 대한 참조 정보는 앱 알림 콘텐츠 스키마를 참조하세요.

적용 대상

SetAttributionText(String)

앱 알림의 특성 텍스트를 설정합니다.

public:
 virtual AppNotificationBuilder ^ SetAttributionText(Platform::String ^ text) = SetAttributionText;
/// [Windows.Foundation.Metadata.Overload("SetAttributionText")]
AppNotificationBuilder SetAttributionText(winrt::hstring const& text);
[Windows.Foundation.Metadata.Overload("SetAttributionText")]
public AppNotificationBuilder SetAttributionText(string text);
function setAttributionText(text)
Public Function SetAttributionText (text As String) As AppNotificationBuilder

매개 변수

text
String

Platform::String

winrt::hstring

특성 텍스트입니다.

반환

추가 메서드 호출을 연결할 수 있도록 AppNotificationBuilder instance 반환합니다.

특성

예제

다음 예제에서는 앱 알림에 대한 XML 페이로드의 특성 텍스트를 설정하는 방법을 보여 줍니다.

var notification = new AppNotificationBuilder()
    .AddText("Notification text.")
    .SetAttributionText("Attribution text")
    .BuildNotification();

AppNotificationManager.Default.Show(notification);

결과 XML 페이로드:

<toast>
    <visual>
        <binding template='ToastGeneric'>
            <text>Notification text.</text>
            <text placement='attribution'>Attribution text</text>
        </binding>
    </visual>
</toast>

설명

다음 이미지는 앱 알림에 특성 텍스트의 배치를 보여줍니다.

재정의된 특성 텍스트가 있는 앱 알림의 스크린샷.

AppNotificationBuilder API를 사용하여 앱 알림에 대한 UI를 만드는 방법에 대한 지침은 앱 알림 콘텐츠를 참조하세요.

앱 알림에 대한 XML 스키마에 대한 참조 정보는 앱 알림 콘텐츠 스키마를 참조하세요.

적용 대상