WindowsFormsHost.FontSize WindowsFormsHost.FontSize WindowsFormsHost.FontSize WindowsFormsHost.FontSize Property

定義

取得或設定裝載的控制項字型大小。Gets or sets the hosted control's font size.

public:
 property double FontSize { double get(); void set(double value); };
public double FontSize { get; set; }
member this.FontSize : double with get, set
Public Property FontSize As Double

屬性值

裝載控制項中所使用的字型大小。The font size used in the hosted control.

備註

這個相依性屬性是由FontSizeProperty欄位所識別。This dependency property is identified by the FontSizeProperty field. 根據預設,這個屬性會對應以更新Control.Font主控控制項的屬性。By default, this property is mapped to update the Control.Font property of the hosted control. 如需詳細資訊,請參閱 Windows Form 和 WPF 屬性對應For more information, see Windows Forms and WPF Property Mapping.

XAML Attribute UsageXAML Attribute Usage

<object FontSize="double"/>  

XAML 值XAML Values

doubledouble
Double值等於或大於0.0,但PositiveInfinity小於的字串表示。String representation of a Double value equal to or greater than 0.0, but smaller than PositiveInfinity. 這會被視為裝置獨立單位 (1/96 英吋)device-independent unit (1/96th inch)測量。This is interpreted as a 裝置獨立單位 (1/96 英吋)device-independent unit (1/96th inch) measurement. 字串不需要明確包含小數點。Strings need not explicitly include decimal points. 例如,可以接受值1。For instance a value of 1 is acceptable.

相依性屬性資訊Dependency Property Information

識別碼欄位Identifier field FontSizeProperty
中繼資料屬性設定為trueMetadata properties set to true AffectsMeasureAffectsRenderInheritsAffectsMeasure, AffectsRender, Inherits

適用於

另請參閱