RadialControllerMenuItem.CreateFromFontGlyph 方法

定義

多載

CreateFromFontGlyph(String, String, String)

使用 RadialController 功能表上的指定文字字串和字型字元) ,建立自訂工具 (。

CreateFromFontGlyph(String, String, String, Uri)

使用 RadialController 功能表上的指定文字字串和字型字元) ,建立自訂工具 (。

CreateFromFontGlyph(String, String, String)

使用 RadialController 功能表上的指定文字字串和字型字元) ,建立自訂工具 (。

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

參數

displayText
String

Platform::String

winrt::hstring

要針對自訂工具顯示的文字字串。

glyph
String

Platform::String

winrt::hstring

要針對自訂工具顯示的字型圖像。

fontFamily
String

Platform::String

winrt::hstring

包含自訂工具所要顯示圖像的字型系列。

傳回

自訂工具。

屬性

Windows 需求

裝置系列
Windows 10 Creators Update (已於 10.0.15063.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v4.0 引進)

備註

當您參考系統上已安裝的字型時,請使用這個方法多載。 否則,請使用 CreateFromFontGlyph (String displayText、String glyph、String fontFamily、Uri fontUri)

RadialController功能表作業,包括CreateFromKnownIconCreateFromIconCreateFromFontGlyph、CreateFromFontGlyphResetToDefaultMenuItems、SetDefaultMenuItemsTrySelectDefaultMenuItem,都應該在 UI 執行緒上執行。 在背景背景背景工作執行緒中這麼做可能會導致 UI 執行緒上的事件處理常式發生問題。

Surface Dial 的UX 指導方針建議下列事項:

  • Text
    • 名稱應該要簡短到可以放入滾輪功能表的中央圓形內
    • 名稱應該清楚地識別主要動作, (互補動作可以隱含)
    • 捲軸指出兩個旋轉方向的效果
    • 復原指定主要動作,但是使用者可以推斷和輕鬆探索重做 (補充動作)

另請參閱

適用於

CreateFromFontGlyph(String, String, String, Uri)

使用 RadialController 功能表上的指定文字字串和字型字元) ,建立自訂工具 (。

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

參數

displayText
String

Platform::String

winrt::hstring

要針對自訂工具顯示的文字字串。

glyph
String

Platform::String

winrt::hstring

要針對自訂工具顯示的字型圖像。

fontFamily
String

Platform::String

winrt::hstring

包含自訂工具所要顯示圖像的字型系列。

fontUri
Uri Uri

統一資源識別項 (URI) ,用來識別用來轉譯圖像的字型位置。

傳回

自訂工具。

屬性

Windows 需求

裝置系列
Windows 10 Creators Update (已於 10.0.15063.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v4.0 引進)

備註

使用此方法多載來參考隨 app appx 套件一起安裝的字型圖像時,您的應用程式可能會在從 Visual Studio 部署時顯示中斷的影像。 在此情況下,您應該先 (Project-Store-CreateAppPackage >>) 建立應用程式套件,然後再部署。

RadialController功能表作業,包括CreateFromKnownIconCreateFromIconCreateFromFontGlyph、CreateFromFontGlyphResetToDefaultMenuItems、SetDefaultMenuItemsTrySelectDefaultMenuItem,都應該在 UI 執行緒上執行。 在背景背景背景工作執行緒中這麼做可能會導致 UI 執行緒上的事件處理常式發生問題。

Surface Dial 的UX 指導方針建議下列事項:

  • Text
    • 名稱應該要簡短到可以放入滾輪功能表的中央圓形內
    • 名稱應該清楚地識別主要動作, (互補動作可以隱含)
    • 捲軸指出兩個旋轉方向的效果
    • 復原指定主要動作,但是使用者可以推斷和輕鬆探索重做 (補充動作)

另請參閱

適用於