How do you tell if a WPF Window is closed?

前端 未结 7 2010
情深已故
情深已故 2020-12-09 07:27

I\'m working on an application that displays some child windows which can either be closed by the user or are automatically closed. While debugging some exceptions that wer

相关标签:
7条回答
  • 2020-12-09 08:02

    Another way : Application.Windows contains a list of open windows. You can check is this collection contains your window (it is removed after closing).

    Looks like you have to call OfType<Window>() because it is a specialized collection.

    0 讨论(0)
提交回复
热议问题