I bind an int to a text field. Is there a way to change the color of the text box based on the bound value?
For example, if int if> 0, the text field should be green, otherwise, red.
Here you should use Value Converters, one of which converts from int to color. Then you bind the background property to the int property (and also bind the text).
Here's a post about them. So what does a Silverlight value converter mean?
If you need to get complicated and use the appropriate styles, try this .
Source: https://habr.com/ru/post/1794606/More articles:How to get ViewData inside a form to display correctly? - asp.net-mvcHow to use breakpoints correctly when using an object initializer? - c #Sort by TStringList, how does sorting work? - delphiHow to use only the default git port with gitorious.org - gitHow to jump to modified strings in Emacs using vc-diff? - svnLua Nested Unpack Bug? - luaGoogle App Engine Task Queue - performanceSort vector custom objects - javaperforming ajax status check - ajaxCan a COM server written in C # detect immediately when the client releases it? - c #All Articles