Language

RadialControllerMenu クラス

定義

RadialController オブジェクトに関連付けられているコンテキスト ツールの統合メニューを表します。

注意

特定のアプリ コンテキストをサポートするために RadialController メニューに追加されたツールは、そのコンテキストでのみ表示されます。 他の RadialController インスタンスには表示されません。

public ref class RadialControllerMenu sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RadialControllerMenu final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RadialControllerMenu
Public NotInheritable Class RadialControllerMenu
継承
Object Platform::Object IInspectable RadialControllerMenu
属性

Windows の要件

要件 説明
デバイス ファミリ
Windows 10 Anniversary Edition (10.0.14393.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v3.0 で導入)

例

この例では、標準アイコンを含むカスタム ツール (Sample) を [Surface Dial] メニューに追加します。

  1. まず、CreateForCurrentView を呼び出して、Surface Dial (myController) の RadialController オブジェクトへの参照を取得します。
  2. 次に、RadialControllerMenuItem.CreateFromIcon を呼び出して RadialControllerMenuItem (myItem) のインスタンスを作成します。
  3. 最後に、その項目をメニュー項目のコレクションに追加します。
public sealed partial class MainPage : Page
 {
     RadialController myController;

     public MainPage()
     {
         this.InitializeComponent();
         // Create a reference to the RadialController.
         myController = RadialController.CreateForCurrentView();

         // Create an icon for the custom tool.
         RandomAccessStreamReference icon =
           RandomAccessStreamReference.CreateFromUri(
             new Uri("ms-appx:///Assets/StoreLogo.png"));

         // Create a menu item for the custom tool.
         RadialControllerMenuItem myItem =
           RadialControllerMenuItem.CreateFromIcon("Sample", icon);

         // Add the custom tool to the RadialController menu.
         myController.Menu.Items.Add(myItem);

         // Declare input handlers for the RadialController.
         myController.ButtonClicked += MyController_ButtonClicked;
         myController.RotationChanged += MyController_RotationChanged;
     }
 }

プロパティ

Name 説明
IsEnabled

RadialController メニューにカスタム ツールを表示するかどうかを取得または設定します。

Items

RadialController メニューのカスタム ツールのコレクションを取得します。 組み込みのツールは含まれていません。

メソッド

Name 説明
GetSelectedMenuItem()

RadialController メニュー からアクティブなカスタム ツールを取得します。

SelectMenuItem(RadialControllerMenuItem)

RadialController メニューから指定したカスタム ツールを選択してアクティブ化します。

TrySelectPreviouslySelectedMenuItem()

RadialController メニューから、以前に選択したツールを選択してアクティブ化しようとします。

このメソッドは、組み込みツールとカスタム ツールを区別しません。

適用対象

関連項目