AppNotificationButton.Content プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
AppNotificationButton のボタン テキストを取得または設定します。
public:
property Platform::String ^ Content { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring Content();
void Content(winrt::hstring value);
public string Content { get; set; }
var string = appNotificationButton.content;
appNotificationButton.content = string;
Public Property Content As String
プロパティ値
ボタン テキストを含む文字列。
例
次の例は、このプロパティを使用して、アプリ通知ボタンのボタン テキストを設定する方法を示しています。
var args = new Dictionary<string, string>() { { "action", "reply" }, { "arg2", "value" } };
var button = new AppNotificationButton();
button.Content = "Reply";
button.Arguments = args;
var notification = new AppNotificationBuilder()
.AddText("Notification text.")
.AddButton(button)
.BuildNotification();
AppNotificationManager.Default.Show(notification);
結果の XML ペイロード:
<toast>
<visual>
<binding template='ToastGeneric'>
<text>Notification text.</text>
</binding>
</visual>
<actions>
<action content='Reply' arguments='action=reply;arg2=value'/>
</actions>
</toast>
注釈
AppNotificationBuilder API を使用してアプリ通知用 UI を作成する方法のガイダンスについては、「アプリ通知のコンテンツ」を参照してください。
アプリ通知の XML スキーマのリファレンス情報については、「アプリ通知 コンテンツ スキーマ」を参照してください。
適用対象
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示