RadialControllerConfiguration RadialControllerConfiguration RadialControllerConfiguration RadialControllerConfiguration RadialControllerConfiguration Class

Definition

Provides configuration details for the RadialController menu.

public : sealed class RadialControllerConfiguration
struct winrt::Windows::UI::Input::RadialControllerConfiguration
public sealed class RadialControllerConfiguration
Public NotInheritable Class RadialControllerConfiguration
// 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 specify which built-in tools are displayed on the menu, and set the default tool.

  1. First, in the ModifySystemDefaults function, we get a reference to the RadialControllerConfiguration object for the Surface Dial (config) by calling GetForCurrentView.
  2. Then, we call SetDefaultMenuItems to specify the default collection of built-in menu items (Volume and Scroll ).
  3. In the Select_Volume function, we attempt to set the default menu item to Volume by calling TrySelectDefaultMenuItem.
public sealed partial class MainPage : Page
{
  RadialControllerConfiguration config;

  private void ModifySystemDefaults(object sender, RoutedEventArgs e) 
  {
    config = RadialControllerConfiguration.GetForCurrentView();
    config.SetDefaultMenuItems(
      new[] { RadialControllerSystemMenuItemKind.Volume, 
        RadialControllerSystemMenuItemKind.Scroll });
  }

  private void Select_Volume(object sender, RoutedEventArgs e)
  {
    config = RadialControllerConfiguration.GetForCurrentView();
    config.TrySelectDefaultMenuItem(RadialControllerSystemMenuItemKind.Volume); 
  }
}

In this example, we clear all built-in tools by calling SetDefaultMenuItems and passing an empty collection.

Important

When present, the InkToolbar adds two custom tools to the RadialController menu (pen and stroke size). These tools are not accessible through RadialController APIs such as Items or SetDefaultMenuItems.

  private void ClearSystemDefaults(object sender, RoutedEventArgs e) 
  {
    config = RadialControllerConfiguration.GetForCurrentView();
    config.SetDefaultMenuItems(
      new[] { });
  }

Remarks

Version history

Windows version SDK version Value added
1703 15063 ActiveControllerWhenMenuIsSuppressed
1703 15063 IsMenuSuppressed
1709 16299 AppController
1709 16299 IsAppControllerEnabled

Properties

ActiveControllerWhenMenuIsSuppressed ActiveControllerWhenMenuIsSuppressed ActiveControllerWhenMenuIsSuppressed ActiveControllerWhenMenuIsSuppressed ActiveControllerWhenMenuIsSuppressed

Gets or sets the RadialController to activate when the RadialController menu is suppressed.

AppController AppController AppController AppController AppController

Gets or sets whether the RadialController object is bound to the main application process rather than a specific app view (or top-level window).

If AppController is set, that radial controller (and menu) is used for the top-level window and all views in the application process (overriding any individual view controllers you have defined).

Note

You must also set IsAppControllerEnabled to true.

IsAppControllerEnabled IsAppControllerEnabled IsAppControllerEnabled IsAppControllerEnabled IsAppControllerEnabled

Gets or sets whether the RadialController object is enabled as an AppController and controller events can be handled by your app.

IsMenuSuppressed IsMenuSuppressed IsMenuSuppressed IsMenuSuppressed IsMenuSuppressed

Gets or sets whether the RadialController menu can be displayed.

Methods

GetForCurrentView() GetForCurrentView() GetForCurrentView() GetForCurrentView() GetForCurrentView()

Retrieves a RadialControllerConfiguration object bound to the active application.

ResetToDefaultMenuItems() ResetToDefaultMenuItems() ResetToDefaultMenuItems() ResetToDefaultMenuItems() ResetToDefaultMenuItems()

Restores the RadialController menu to the default configuration.

SetDefaultMenuItems(IIterable<RadialControllerSystemMenuItemKind>) SetDefaultMenuItems(IIterable<RadialControllerSystemMenuItemKind>) SetDefaultMenuItems(IIterable<RadialControllerSystemMenuItemKind>) SetDefaultMenuItems(IIterable<RadialControllerSystemMenuItemKind>) SetDefaultMenuItems(IIterable<RadialControllerSystemMenuItemKind>)

Specifies which built-in tools are shown on the RadialController menu.

Important

When present, the InkToolbar adds two custom tools to the RadialController menu (pen and stroke size). These tools are not accessible through RadialController APIs such as Items or SetDefaultMenuItems.

TrySelectDefaultMenuItem(RadialControllerSystemMenuItemKind) TrySelectDefaultMenuItem(RadialControllerSystemMenuItemKind) TrySelectDefaultMenuItem(RadialControllerSystemMenuItemKind) TrySelectDefaultMenuItem(RadialControllerSystemMenuItemKind) TrySelectDefaultMenuItem(RadialControllerSystemMenuItemKind)

Attempts to select and activate a tool from the collection of built-in RadialController tools supported for the current app context.

See also