I have a Button
that closes my window when it\'s clicked:
We have the name property in the .xaml definition:
x:Name="WindowsForm"
Then we have the button:
Then in the ViewModel:
public DelegateCommand
Then at last, the action method:
private void CloseAction (object obj)
{
Window Win = obj as Window;
Win.Close();
}
I used this code to close a pop-up window from an application..