Remarks
The property returns null when the text selection contains multiple characters with mixed font sizes.
The WPF.
Gets or sets the font's size, in twips, at the current input position. If text is selected, the property specifies the font size of the whole selected text.
public int? FontSize { get; set; }
Public Property FontSize() As Nullable(Of Integer)
The following XAML example binds the Font
?
xmlns:tx="clr-namespace:TXTextControl.WPF;assembly=TXTextControl.WPF"
?
<Window.Resources>
<tx:MeasureConverter Unit="Point" Decimals="1" x:Key="twipsconv" />
</Window.Resources>
?
<TextBox
Height="21"
Name="textBoxFontSize"
Text="{Binding ElementName=textControl1,
Path=InputFormat.FontSize,
Converter={StaticResource twipsconv},
Mode=TwoWay}"/>
The property returns null when the text selection contains multiple characters with mixed font sizes.
The WPF.