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.