共用方式為


MenuItem.SetAccelerator(BindableObject, Accelerator) 方法

定義

警告

Use MenuFlyoutItem.KeyboardAcceleratorsProperty instead.

設定指定可繫結物件的加速器。

public:
 static void SetAccelerator(Microsoft::Maui::Controls::BindableObject ^ bindable, Microsoft::Maui::Controls::Accelerator ^ value);
[System.Obsolete("Use MenuFlyoutItem.KeyboardAcceleratorsProperty instead.")]
public static void SetAccelerator (Microsoft.Maui.Controls.BindableObject bindable, Microsoft.Maui.Controls.Accelerator value);
[<System.Obsolete("Use MenuFlyoutItem.KeyboardAcceleratorsProperty instead.")>]
static member SetAccelerator : Microsoft.Maui.Controls.BindableObject * Microsoft.Maui.Controls.Accelerator -> unit
Public Shared Sub SetAccelerator (bindable As BindableObject, value As Accelerator)

參數

bindable
BindableObject

要設定快速鍵的可繫結物件。

value
Accelerator

物件的新加速器。

屬性

適用於