WPF Property Data binding to negate the property

后端 未结 4 1734
忘掉有多难
忘掉有多难 2020-12-16 10:13

Is there any way to change the value of property at runtime in WPF data binding. Let\'s say my TextBox is bind to a IsAdmin property. Is there anyway I can change that prope

4条回答
  •  攒了一身酷
    2020-12-16 10:43

    You can write a ValueConverter that automatically negates the inpurt before returning it. Have a look at BenCon's blog for a short reading on value converters.

提交回复
热议问题