WPF App loses completely focus on window close

前端 未结 8 2215
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-12 20:40

Problem description

If I make a non-modal window as a child window through setting the Owner of the window to a parent window, and then show a Messa

相关标签:
8条回答
  • 2020-12-12 21:35

    Ownership has nothing to do with which window activation. To see this, change the owner of the second window to the top window and run the program. Notice that nothing changes. Ownership has to do with "If a window is minimized what other windows need to be minimized". So you are stuck with using custom activation code.

    0 讨论(0)
  • 2020-12-12 21:36

    Johsua's .Activate (see above) solution works quite nicely with all sorts of window types. At least it did the trick for me.

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