I have a static class called commands. One the RoutedCommands in it is called ConfirmNoPrint. I want to Execute it in code behind from my custom control like this:
Commands.ConfirmNoPrint.Execute(null, [WHAT_DO_I_PUT_HERE]);
In the custom control class I have an instance of Binding whose RelativeSource property is set like this:
_mainControlBinding.RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(UserControl), 2);
Can I use one of the properties of _mainControlBinding to get the instance of IInputElement I need to pass as the second parameter of Commands.ConfirmNoPrint.Execute ?
The command binding for ConfirmNoPrint is the parent of my custom control, but it is in a different assembly. I can't add a reference to it since it would cause a circular reference.
I am barking up the wrong tree entirely?