Reputation: 239
I have a bound textbox and I need to change its associated display label to bold upon the presence of any content. I dont want to use javascript if at all possible.
Thanks
Upvotes: 3
Views: 810
Reputation: 25146
Why would javascript be involved?
Anyway, if this is really wpf, bind the FontWeight property of your label to the textbox's text property, using custom converter that converts null/empty strings to Normal font weight, and non-null/non-empty to Bold.
Upvotes: 4