Has somebody a good example to create a UserControl, and then bind commands to it?
My problem is to forward the command to a control in the UserControl, for example to a TreeView's Drop event. It's not clear, how can I do that.
Both answer are interesting and thanks, they help, but...
I want something like that:
The usage:
<my:MyControl Command="{Binding XCommand}" CommandParameter="{Binding [Here what?]}"/>
The control contains the two DependencyProperties, Command and CommandParameters, and I'd like to bind these two DependecyProperties to a TreeView - Drop event. How can I do that? Because the usage of the CommandParameter is reversed: not the control passes a parameter, but the users wants something: CommandParameter="{Binding Text, ElementName=DisableCommandTextBox}"