I am designing GUI for my project.
What I need to do is changing the color of a label depending on a boolean in a binding source. But the problem is that I need to assign a Color to the label wheres binding source doesn’t have this(I don’t want a Color property in binding source).
How can I handle to make label red when bool is true otherwise black?
Thanks in advance.
Since you cannot bind them directly, you have to create an extra property on either side. Either you add a Color property in the (business) object (which you said you didn’t want), so that leaves adding a property on the form/control which you bind to the property on your (business) object.
UPDATE
If you want to add a property to the form to which you can bind, add the following.
Now you can bind the business-object-property to this property, and it should work.