RadialControllerMenuItem クラス

定義

RadialController メニューから 1 つのカスタム ツールを表します。

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

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;
     }
 }

注釈

バージョン履歴

Windows のバージョン SDK バージョン 追加された値
1703 15063 CreateFromFontGlyph(String,String,String)
1703 15063 CreateFromFontGlyph(String,String,String,Uri)

プロパティ

DisplayText

RadialController メニューのカスタム ツールのテキスト文字列を取得します。

Tag

RadialController メニューのカスタム ツールを識別するために使用するオブジェクトを取得または設定します。

メソッド

CreateFromFontGlyph(String, String, String)

RadialController メニューで (指定したテキスト文字列とフォント グリフを使用して) カスタム ツールを作成します。

CreateFromFontGlyph(String, String, String, Uri)

RadialController メニューで (指定したテキスト文字列とフォント グリフを使用して) カスタム ツールを作成します。

CreateFromIcon(String, RandomAccessStreamReference)

RadialController メニューで(指定したテキスト文字列とカスタム アイコンを使用して) カスタム ツールを作成します。

CreateFromKnownIcon(String, RadialControllerMenuKnownIcon)

RadialController メニューのカスタム ツール (指定したテキスト文字列とシステム アイコンを使用) を作成します。

イベント

Invoked

RadialController メニューからカスタム ツールが選択されている場合に発生します。

適用対象

こちらもご覧ください