Font Settings in Xamarin NumericUpDown (SfNumericUpDown)

29 Sep 20231 minute to read

You can customize the font style of SfNumericUpDown using the following font-related properties that display the value’s text:

  • FontSize : Sets the font size for NumericUpDown’s text.

  • FontAttributes : Sets the style of NumericUpDown’s text. You can add following types of styles to it.

    1. Bold: Sets the style of NumericUpDown’s text to bold.
    2. Italic: Sets the style of NumericUpDown’s text to italic.
    3. None: Keeps the style of NumericUpDown’s text as same. It will not modify the style.

NOTE

The default value of this property is None.

  • FontFamily : Customizes the font family of the NumericUpDown’s text.

  • TextAlignment : Customizes the NumericUpDown’s text alignment position. You can align the text in Start, End, and Center position.

NOTE

The default value of this property is [Start].

<numeric:SfNumericUpDown FontSize="27"  FontAttribute="Bold" Value="123" TextAlignment="End" />
SfNumericUpDown NumericUpDown=new SfNumericUpDown();
NumericUpDown.FontSize = 27;
NumericUpDown.Value = 123;
NumericUpDown.TextAlignment=TextAlignment.End;
NumericUpDown.FontAttribute = FontAttributes.Bold;
this.Content = NumericUpDown;

Display the NumericUpDown control with FontCustomization

See also

How to customize the text in the SfNumericUpDown