I am working on an application using WPF and visual c#, and I am trying to implement an annotation feature which allows for drawing on the desktop.
My current way of accomplishing this is by making a total screen-sized window with a transparent background, and putting this over the desktop, allowing me to "write" on this invisible window. However, I have another set of windows that constitute a floating menu of sorts on the screen, and I want this menu to always be interactable, even when the user is annotating (for example, this is where I want to put some annotation options).
When I show my transparent window, however, my menu windows are all behind it, which means i draw over these windows instead of clicking on them. I have tried things like setting topmost on the menu windows, but this does not put them over the transparency.
My current idea now is to make a non-rectangular window out of the transparent window and basically just cut out the region the floating menu is in, and dynamically update this if the user drags the menu to another place on the screen. Is this feasible/possible, and how can I dynamically make these window changes? if this is not possible, is there a better way of forcing all my menu windows to always be on top of the annotation transparency?
edit: as an additional note, is there any way at all to set a z-index of sorts on these windows? that would resolve this, I think, if I could z-index the menu windows all the way to the front and then index the transparency to one behind that, but I was unable to find a way to do this.
edit: someone commented and suggested I re-set topmost = true for my menu windows once I create my transparent window, but this ended up having no effect
FINAL EDIT: I fixed the issue using David Edey's suggestion of setting topmost; turns out I had a rogue line of code setting the transparency as topmost=true, causing this issue when setting the window topmost properties, but now it works like a charm. Thank you so much for your help!