RadialControllerMenu RadialControllerMenu RadialControllerMenu RadialControllerMenu Class

Definition

Represents the integrated menu of contextual tools associated with the RadialController object.

Note

Tools added to a RadialController menu in support of a specific app context are only displayed in that context. They are not displayed for other RadialController instances.

public : sealed class RadialControllerMenu : IRadialControllerMenupublic sealed class RadialControllerMenu : IRadialControllerMenuPublic NotInheritable Class RadialControllerMenu Implements IRadialControllerMenu// You can use this class in JavaScript.
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

IsEnabled IsEnabled IsEnabled IsEnabled

Gets or sets whether custom tools are displayed on the RadialController menu.

public : PlatForm::Boolean IsEnabled { get; set; }public bool IsEnabled { get; set; }Public ReadWrite Property IsEnabled As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

true if the menu displays custom tools; otherwise false.

If false, no custom tools are displayed, and Items is empty.

Remarks

In Windows 10 Anniversary Update, this property does not return a value.

See Also

Items Items Items Items

Gets the collection of custom tools on the RadialController menu. Built-in tools are not included.

public : IVector<RadialControllerMenuItem> Items { get; }public IList<RadialControllerMenuItem> Items { get; }Public ReadOnly Property Items As IList<RadialControllerMenuItem>// You can use this property in JavaScript.
Value
IVector<RadialControllerMenuItem> IList<RadialControllerMenuItem> IList<RadialControllerMenuItem> IList<RadialControllerMenuItem>

The collection of custom tools (RadialControllerMenuItem ) on the RadialController menu.

See Also

Methods

GetSelectedMenuItem() GetSelectedMenuItem() GetSelectedMenuItem() GetSelectedMenuItem()

Retrieves the active custom tool from the RadialController menu .

public : RadialControllerMenuItem GetSelectedMenuItem()public RadialControllerMenuItem GetSelectedMenuItem()Public Function GetSelectedMenuItem() As RadialControllerMenuItem// You can use this method in JavaScript.
Returns

The active custom tool. Null if a custom tool is not active.

See Also

SelectMenuItem(RadialControllerMenuItem) SelectMenuItem(RadialControllerMenuItem) SelectMenuItem(RadialControllerMenuItem) SelectMenuItem(RadialControllerMenuItem)

Selects and activates the specified custom tool from the RadialController menu.

public : void SelectMenuItem(RadialControllerMenuItem menuItem)public void SelectMenuItem(RadialControllerMenuItem menuItem)Public Function SelectMenuItem(menuItem As RadialControllerMenuItem) As void// You can use this method in JavaScript.
Parameters
See Also

TrySelectPreviouslySelectedMenuItem() TrySelectPreviouslySelectedMenuItem() TrySelectPreviouslySelectedMenuItem() TrySelectPreviouslySelectedMenuItem()

Attempts to select and activate the previously selected tool from the RadialController menu.

This method does not differentiate between built-in and custom tools.

public : PlatForm::Boolean TrySelectPreviouslySelectedMenuItem()public bool TrySelectPreviouslySelectedMenuItem()Public Function TrySelectPreviouslySelectedMenuItem() As bool// You can use this method in JavaScript.
Returns
PlatForm::Boolean bool bool bool

true if the previously selected tool can be selected and activated; otherwise false.

See Also

See Also