Assume that I have two WPF windows: window_One and window_Two.
Inside the custom control that you've created. You can access the parent window from within the button event click.
Either by using the visual tree:
var myWindow = (Window)VisualParent.GetSelfAndAncestors().FirstOrDefault(a => a is Window);
myWindow.Close();
or by simply:
var myWindow = Window.GetWindow(this);
myWindow.Close();
Of course, the other option would be to create a custom event that says "MyButtonClicked" and then have the window that hosts the UserControl to listen to this event and when the Event is fired, you close the current window.
Cheers!