Articles in this section
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.

Changing Negative Value Color in WPF PercentTextBox

 

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