TextField.GetFontId 方法
取得要繪製具有指定的 ShapeElement 執行個體的字型 id。
命名空間: Microsoft.VisualStudio.Modeling.Diagrams
組件: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll 中)
語法
'宣告
Public Overridable Function GetFontId ( _
parentShape As ShapeElement _
) As StyleSetResourceId
public virtual StyleSetResourceId GetFontId(
ShapeElement parentShape
)
參數
- parentShape
型別:Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement
要繪製 ShapeElement。
傳回值
型別:Microsoft.VisualStudio.Modeling.Diagrams.StyleSetResourceId
備註
根據預設,這個方法會傳回此 ShapeField 的預設字型識別碼。若要以動態方式變更這個 ShapeField 的字型,覆寫這個方法。修改範例中的,在TextField。
預設值是 DiagramFonts.ShapeText。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。