Search code examples
c#.netwpfbindingisenabled

How to bind the IsEnabled property to an OR of two values?


currently when I have to make an OR of two values on the IsEnabled property of a control I end using an invisible container control (I use a Border) and setting the IsEnabled of the control and the one of the container.

Is there a better approach? If not, what is the most lightweight control for doing this?

Thanks in advance.


Solution

  • If IsEnabled is set via binding, you may use MultiBinding in conjunction with a multi-value converter.