RadialControllerMenuItem.CreateFromIcon(String, RandomAccessStreamReference) RadialControllerMenuItem.CreateFromIcon(String, RandomAccessStreamReference) RadialControllerMenuItem.CreateFromIcon(String, RandomAccessStreamReference) RadialControllerMenuItem.CreateFromIcon(String, RandomAccessStreamReference) RadialControllerMenuItem.CreateFromIcon(String, RandomAccessStreamReference) Method

Definition

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

public : static RadialControllerMenuItem CreateFromIcon(Platform::String displayText, RandomAccessStreamReference icon)
static RadialControllerMenuItem CreateFromIcon(winrt::hstring displayText, RandomAccessStreamReference icon) const;
public static RadialControllerMenuItem CreateFromIcon(String displayText, RandomAccessStreamReference icon)
Public Shared Function CreateFromIcon(displayText As String, icon As RandomAccessStreamReference) As RadialControllerMenuItem
var radialControllerMenuItem = Windows.UI.Input.RadialControllerMenuItem.createFromIcon(displayText, icon);

Parameters

displayText
String String String

The text string to display for the custom tool.

icon
RandomAccessStreamReference RandomAccessStreamReference RandomAccessStreamReference

The custom icon to display for the custom tool.

Returns

Remarks

RadialController menu operations, including CreateFromKnownIcon, CreateFromIcon, CreateFromFontGlyph, CreateFromFontGlyph, ResetToDefaultMenuItems, SetDefaultMenuItems, and TrySelectDefaultMenuItem, should be performed on the UI thread. Doing so in a background worker thread can cause issues with event handlers on the UI thread.

UX guidelines for the Surface Dial recommend the following:

Text

  • Names should be short to fit inside the central circle of the wheel menu
  • Names should clearly identify the primary action (a complementary action can be implied)
  • Scroll indicates the effect of both rotation directions
  • Undo specifies a primary action, but redo (the complementary action) can be inferred and easily discovered by the user

Icons

  • Provide a high-quality 64 x 64 pixel PNG image (44 x 44 is the smallest supported)
  • Ensure the background is transparent
  • The icon should fill most of the image
  • A white icon should have a black outline to be visible in high contrast mode