KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What's the easiest way to figure out if a window is opened modally or not? CLARIFICATION: I open a window calling myWindow.ShowDialog(); I have a footer with an "OK" & "Cancel" button that I only want to show if the window is opened modally. Now I realize I can set a property by doing this: myWindow.IsModal = true; myWindow.ShowDialog(); But I want the window itself to make that determination. I want to check in the Loaded event of the window whether or not it is modal. UPDATE The IsModal property doesn't actually exist in a WPF window. It's a property that I have created. ShowDialog() blocks the current thread. I'm guessing I can determine if the Window is opened via ShowDialog() by checking if the current thread is blocked. How would I go about doing that?
Tags (comma-separated)
Save Edits
Cancel