
Hi, I hope the question can be answered:
I have a DocumentWindow named tw. I then have tw.Content set to some Windows UserControl with custom grid for the users to use. I then call the activate function of tw. The end result is that the screen/usercontrol properly docks onto the window.
However, I want to add logic in the usercontrol to perform certan checks before actually displaying the screen. If the conditions arent met, then i would like to exit/close/destroy the screen/usercontrol. I cant seem to find a way to do that in the C# code because when I try to find its parent of the usercontrol, I get null.
The closing/removing/unloading of the usercontrol must be done within the usercontrol itself.
Any help is appreciated!