RadialControllerMenuItem.CreateFromFontGlyph Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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) |
Creates a custom tool (using the specified text string and font glyph) on the RadialController menu. |
CreateFromFontGlyph(String, String, String)
Creates a custom tool (using the specified text string and font glyph) on the RadialController menu.
public:
static RadialControllerMenuItem ^ CreateFromFontGlyph(Platform::String ^ displayText, Platform::String ^ glyph, Platform::String ^ fontFamily);
/// [Windows.Foundation.Metadata.Overload("CreateFromFontGlyph")]
static RadialControllerMenuItem CreateFromFontGlyph(winrt::hstring const& displayText, winrt::hstring const& glyph, winrt::hstring const& fontFamily);
[Windows.Foundation.Metadata.Overload("CreateFromFontGlyph")]
public static RadialControllerMenuItem CreateFromFontGlyph(string displayText, string glyph, string fontFamily);
function createFromFontGlyph(displayText, glyph, fontFamily)
Public Shared Function CreateFromFontGlyph (displayText As String, glyph As String, fontFamily As String) As RadialControllerMenuItem
Parameters
- displayText
-
String
Platform::String
winrt::hstring
The text string to display for the custom tool.
- glyph
-
String
Platform::String
winrt::hstring
The font glyph to display for the custom tool.
- fontFamily
-
String
Platform::String
winrt::hstring
The font family that contains the glyph to display for the custom tool.
Returns
The custom tool.
- Attributes
Windows requirements
Device family |
Windows 10 Creators Update (introduced in 10.0.15063.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v4.0)
|
Remarks
Use this method overload when you referencing a font already installed on the system. Otherwise, use CreateFromFontGlyph(String displayText, String glyph, String fontFamily, Uri fontUri).
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
See also
- CreateFromFontGlyph(String, String, String, Uri)
- CreateFromIcon(String, RandomAccessStreamReference)
- CreateFromKnownIcon(String, RadialControllerMenuKnownIcon)
- Surface Dial interactions
- Universal Windows Platform samples (C# and C++)
- Windows desktop sample
Applies to
CreateFromFontGlyph(String, String, String, Uri)
Creates a custom tool (using the specified text string and font glyph) on the RadialController menu.
public:
static RadialControllerMenuItem ^ CreateFromFontGlyph(Platform::String ^ displayText, Platform::String ^ glyph, Platform::String ^ fontFamily, Uri ^ fontUri);
/// [Windows.Foundation.Metadata.Overload("CreateFromFontGlyphWithUri")]
static RadialControllerMenuItem CreateFromFontGlyph(winrt::hstring const& displayText, winrt::hstring const& glyph, winrt::hstring const& fontFamily, Uri const& fontUri);
[Windows.Foundation.Metadata.Overload("CreateFromFontGlyphWithUri")]
public static RadialControllerMenuItem CreateFromFontGlyph(string displayText, string glyph, string fontFamily, System.Uri fontUri);
function createFromFontGlyph(displayText, glyph, fontFamily, fontUri)
Public Shared Function CreateFromFontGlyph (displayText As String, glyph As String, fontFamily As String, fontUri As Uri) As RadialControllerMenuItem
Parameters
- displayText
-
String
Platform::String
winrt::hstring
The text string to display for the custom tool.
- glyph
-
String
Platform::String
winrt::hstring
The font glyph to display for the custom tool.
- fontFamily
-
String
Platform::String
winrt::hstring
The font family that contains the glyph to display for the custom tool.
The Uniform Resource Identifier (URI) that identifies the location of the font used for rendering the glyph.
Returns
The custom tool.
- Attributes
Windows requirements
Device family |
Windows 10 Creators Update (introduced in 10.0.15063.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v4.0)
|
Remarks
When using this method overload to reference a font glyph installed with your app's appx package, your app might display a broken image when deployed from Visual Studio. In this case, you should first create an app package (Project->Store->CreateAppPackage) and then deploy.
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
See also
- CreateFromFontGlyph(String, String, String)
- CreateFromIcon(String, RandomAccessStreamReference)
- CreateFromKnownIcon(String, RadialControllerMenuKnownIcon)
- Surface Dial interactions
- Universal Windows Platform samples (C# and C++)
- Windows desktop sample