Articles in this section
Category / Section

How to set the negative foreground color in WPF DoubleTextBox?

1 min read

You can change a negative color for the value of WPF DoubleTextBox by setting the NegativeForeground property and it will be applied when the ApplyNegativeForeground property is true, and the Value is negative. The default color of NegativeForeground is Red.

XAML

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

 

C#

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

The following screenshot displays the setting of Foreground color for the negative values.

Changing Negative Value Color in WPF DoubleTextBox

 

Conclusion

I hope you enjoyed learning about how to set the negative foreground color in WPF Double TextBox.

 You can refer to our WPF Double TextBox feature tour  page to know about its other groundbreaking feature representations. You can also explore  documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

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