Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
495
conditional binding of Background property in xamNumericEditor
posted

Hello,

I try to solve the following issue:

I have a XamNumericEditor, with its Background property bound to the value of that same control. (Done it with a converter which checks the value , and returns an appropriate color).

Now I would like to expand the style which was applied on that xamNumericEditor:

I have another control, of type XamTextEditor, which would have 2 conditions:

There is a text in the control, or there is no text at all.

In case there is a text, I want to apply a specific color on my first XamNumericEditor Background property.

Must say that the second trigger is more powerful than the first one, I mean if there is a text in the second control, I want to apply the new color on the first control, with no matter what's the value in that control.

 

Can I apply a double setter to the Background property? or maybe a second style to the same control?

I mean if I make a converter from text to color, how can I apply both of the them on the style?

I know I can maybe solve the solution putting a trigger on the style, but I don't have a property which I can check, to know whether there is a text in the second control.

Would like to hear some ideas,

Thanks in advance

Max.

Parents
No Data
Reply Children
No Data