AppNotificationButton.ContextMenuPlacement プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
アプリ通知コンテキスト メニュー内にボタンを表示するかどうかを指定する値を取得または設定します。
public:
property bool ContextMenuPlacement { bool get(); void set(bool value); };
bool ContextMenuPlacement();
void ContextMenuPlacement(bool value);
public bool ContextMenuPlacement { get; set; }
var boolean = appNotificationButton.contextMenuPlacement;
appNotificationButton.contextMenuPlacement = boolean;
Public Property ContextMenuPlacement As Boolean
プロパティ値
Boolean
bool
True を指定すると、アプリ通知コンテキスト メニュー内にボタンが配置されます。それ以外の場合は false。
例
次の例は、このメソッドを使用して、アプリ通知コンテキスト メニューにボタンを追加する方法を示しています。
var button = new AppNotificationButton("More info")
.AddArgument("action", "info");
button.ContextMenuPlacement = true;
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='More info' arguments='action=info' placement='contextMenu'/>
</actions>
</toast>
注釈
AppNotificationButton.SetContextMenuPlacement を呼び出して、コンテキスト メニューの配置値を設定することもできます。
AppNotificationBuilder API を使用してアプリ通知用 UI を作成する方法のガイダンスについては、「アプリ通知のコンテンツ」を参照してください。
アプリ通知の XML スキーマのリファレンス情報については、「アプリ通知 コンテンツ スキーマ」を参照してください。
適用対象
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示