I am building a form editor in WPF. One of the features we need in it is to let the user “lock” one or more controls on the canvas. By locking I mean the user would not be able to move, resize or modify other properties of the control.
I have tried with ContentControl but did not get the results I am looking for.
I think you should use the
IsEnabledproperty. Basic controls with interaction have this, and you can expose it on your custom controls as well and pass the property down.If something is set with
IsEnabled = falseit will be grayed out and cannot be affected by user input.