RadialControllerMenu 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 : IRadialControllerMenu
struct winrt::Windows::UI::Input::RadialControllerMenu : IRadialControllerMenu
public sealed class RadialControllerMenu : IRadialControllerMenu
Public NotInheritable Class RadialControllerMenu Implements IRadialControllerMenu
// 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

IsEnabled IsEnabled IsEnabled IsEnabled IsEnabled

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

Items Items Items Items Items

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

Methods

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

Retrieves the active custom tool from the RadialController menu .

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

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

TrySelectPreviouslySelectedMenuItem() 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.

See Also