RadialControllerMenuItem RadialControllerMenuItem RadialControllerMenuItem RadialControllerMenuItem RadialControllerMenuItem Class

Definition

Represents a single custom tool from the RadialController menu.

public : sealed class RadialControllerMenuItem : IRadialControllerMenuItem
struct winrt::Windows::UI::Input::RadialControllerMenuItem : IRadialControllerMenuItem
public sealed class RadialControllerMenuItem : IRadialControllerMenuItem
Public NotInheritable Class RadialControllerMenuItem Implements IRadialControllerMenuItem
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Examples

In this example, we add a custom tool (Sample) with a standard icon to the Surface Dial menu.

  1. First, we get a reference to the RadialController object for the Surface Dial (myController) by calling CreateForCurrentView.
  2. We then create an instance of a RadialControllerMenuItem (myItem) by calling RadialControllerMenuItem.CreateFromIcon.
  3. Finally, we append that item to the collection of menu items.
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;
     }
 }

Properties

DisplayText DisplayText DisplayText DisplayText DisplayText

Gets the text string of the custom tool on the RadialController menu.

Tag Tag Tag Tag Tag

Gets or sets an object used to identify custom tools on the RadialController menu.

Methods

CreateFromFontGlyph(String, String, String) CreateFromFontGlyph(String, String, String) CreateFromFontGlyph(String, String, String) CreateFromFontGlyph(String, String, String) CreateFromFontGlyph(String, String, String)

Creates a custom tool (using the specified text string and font glyph) on the RadialController menu.

CreateFromFontGlyph(String, String, String, Uri) CreateFromFontGlyph(String, String, String, Uri) CreateFromFontGlyph(String, String, String, Uri) CreateFromFontGlyph(String, String, String, Uri) CreateFromFontGlyph(String, String, String, Uri)

Creates a custom tool (using the specified text string and font glyph) on the RadialController menu.

CreateFromIcon(String, RandomAccessStreamReference) CreateFromIcon(String, RandomAccessStreamReference) CreateFromIcon(String, RandomAccessStreamReference) CreateFromIcon(String, RandomAccessStreamReference) CreateFromIcon(String, RandomAccessStreamReference)

Creates a custom tool (using the specified text string and custom icon) on the RadialController menu.

CreateFromKnownIcon(String, RadialControllerMenuKnownIcon) CreateFromKnownIcon(String, RadialControllerMenuKnownIcon) CreateFromKnownIcon(String, RadialControllerMenuKnownIcon) CreateFromKnownIcon(String, RadialControllerMenuKnownIcon) CreateFromKnownIcon(String, RadialControllerMenuKnownIcon)

Creates a custom tool (using the specified text string and system icon) on the RadialController menu.

Events

Invoked Invoked Invoked Invoked Invoked

Occurs when a custom tool is selected from the RadialController menu.

See Also