Category / Section
How to set the negative foreground color in WPF PercentTextBox?
1 min read
You can change a negative color for the value of WPF PercentTextBox by setting the NegativeForeground property and it will be applied when the ApplyNegativeForeground property is true and the PercentValue is negative. The default color of NegativeForeground is Red.
XAML
<syncfusion:PercentTextBox x:Name="percentbox" NegativeForeground="Red" ApplyNegativeForeground="True" />
C#
percentbox.NegativeForeground=new SolidColorBrush(Colors.Red); percentbox.ApplyNegativeForeground = true;
The following screenshot displays the foreground color when you assign a negative value.