Open srwi opened 5 years ago
Haven't really played with wpf windows but I think they are a bit different. I know that winforms windows (Forms) work fine. I tried out the steps above and I see that the error is because a window has to be top level and can't be a child. I remember I was able to use a window before though when I was experimenting, I'll update if I remember.
I also don't know much about the deactivated so that needs some investigation too.
If you change it so that you get the handle from new WindowInteropHelper(window).Handle
it will work.
I am trying to use a
Window
instead of a simpleUserControl
so I can take advantage of itsActivated
andDeactivated
events. However the deskband does not show.Steps to reproduce:
Window1
protected override UIElement UIElement => new Window1();
Alternatively, is there any other way to detect if the deskband (including all of its child windows) get deactivated?