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,但是小於PositiveInfinityString 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 AffectsMeasure, AffectsRender, InheritsAffectsMeasure, AffectsRender, Inherits

適用於

另請參閱