다음을 통해 공유


AppNotificationComboBox.Title 속성

정의

앱 알림 콤보 상자의 제목을 가져오거나 설정합니다.

public:
 property Platform::String ^ Title { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring Title();

void Title(winrt::hstring value);
public string Title { get; set; }
var string = appNotificationComboBox.title;
appNotificationComboBox.title = string;
Public Property Title As String

속성 값

String

Platform::String

winrt::hstring

콤보 상자의 제목을 포함하는 문자열입니다.

예제

다음 예제에서는 이 속성을 사용하여 앱 알림 콤보 상자의 제목을 설정하는 방법을 보여 줍니다.

var comboBox = new AppNotificationComboBox("combobox_id");
comboBox.Title = "Select an item:";
comboBox.Items = new Dictionary<string, string> { { "id_one", "Item one" }, { "id_two", "Item two" } };
comboBox.SelectedItem = "id_one";

var notification = new AppNotificationBuilder()
    .AddText("Notification text.")
    .AddComboBox(comboBox)
    .BuildNotification();

AppNotificationManager.Default.Show(notification);

긴급 시나리오가 지원되는 경우 결과 XML 페이로드:

<toast>
    <visual>
        <binding template='ToastGeneric'>
            <text>Notification text.</text>
        </binding>
    </visual>
    <actions>
        <input id='combobox_id' type='selection' title='Select an item:' defaultInput='id_one'>
            <selection id='id_one' content='Item one'/>
            <selection id='id_two' content='Item two'/>
        </input>
    </actions>
</toast>

설명

AppNotificationComboBox.SetTitle 속성을 사용하여 제목을 설정할 수도 있습니다.

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

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

적용 대상