passing the current Window as a CommandParameter
There are two ways I can of think to do this: Give the window a name (via a x:Name attribute on the Window tag, and then construct a binding like this (assumes the name of the window is ‘ThisWindow’): <Button Command=”CommandGetsCalled” CommandParameter=”{Binding ElementName=ThisWindow}” /> For something more general (doesn’t rely on giving the current Window … Read more