Font Settings in Xamarin Numeric Entry (SfNumericTextBox)
11 Sep 20231 minute to read
SfNumericTextBox
has the following two font-related properties that display the Value
text:
You can customize the font style of SfNumericTextBox
by using the following properties.
-
FontSize
: Sets the font size forSfNumericTextBox
text. -
FontAttributes
: Sets the style ofSfNumericTextBox
text. You can apply three types of style on it. It is specifying style information like Italic and Bold (using the FontAttributes enumeration in C#).- Bold - The font is bold.
- Italic – The font is Italic.
- None – The font is unmodified.
NOTE
Default value is None.
-
FontFamily
: Customizes the font family of theSfNumericTextBox
text. -
TextAlignment
: Sets the style ofSfNumericTextBox
text. You can apply three types of style on it. It is specifying style information like Start, End, and Center (using the TextAlignment enumeration in C#).
NOTE
Default value is [
Start
].
To set the font size and attributes in XAML as well as in C#:
<syncfusion:SfNumericTextBox FontSize="27" FontAttributes="Bold" Value="123" TextAlignment="End" />
SfNumericTextBox numericTextBox=new SfNumericTextBox();
numericTextBox.FontSize = 27;
numericTextBox.Value = 123;
numericTextBox.TextAlignment=TextAlignment.End;
numericTextBox.FontAttributes = FontAttributes.Bold;
this.Content = numericTextBox;