Replies: 1 comment 2 replies
-
Are you creating bindings between a VM and a control or between two controls? But I guess you can just do the same the other way around? Create an observable/binding for the IsCheckedProperty of the checkbox and bind it to the visual? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am dynamically creating a context menu that binds a CheckBox.IsChecked to a Visual.IsVisible
The first time CheckBox is initialized, it takes the value of the visual, afterwards, the CheckBox updates the IsVisible property of the visual.
My current approach is:
The binding works.... in one direction; the checkbox successfully gets the value from the IsVisible property... but it's unable to change it back.
Another detail worth to mention is that CheckBox.IsChecked is of type nullable
bool?
whereas Visual.IsVisible is of typebool
, but certainly it's not affecting the current one-way binding.So how can I set this binding as a two way? Maybe using CompiledBindingExtension instead?
Beta Was this translation helpful? Give feedback.
All reactions