Articles in this section
Category / Section

How to set negative foreground color in WPF IntegerTextBox?

1 min read

You can change the foreground color for negative value by using NegativeForeground and ApplyNegativeForeground properties in WPF IntegerTextBox.

XAML

<syncfusion:IntegerTextBox x:Name="integerbox" Value="-12345" NegativeForeground="Red" ApplyNegativeForeground="True" />

C#

integerbox.NegativeForeground=new SolidColorBrush(Colors.Red);
integerbox.ApplyNegativeForeground = true;
integerbox.Value=-12345;

The following screenshot displays the foreground color when you assign negative value.

Changing negative value foreground color in WPF IntegerTextBox

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied