There should be a method which hides/closes (depending on the CloseAction) a DocumentWindow. This method should be called from the DocumentWindow instance.