Reputation: 36050
I found the answer to this question in here.
that solution works great when you call the method just once (don't call it from the event window activated). I am creating a gadget and I want the window to always be in the back. if the user clicks on the gadget I don't want it to come to the front which is the default behavior of windows. so what I did in order to solve that problem was to create this event:
private void Window_Activated(object sender, EventArgs e)
{
SendWpfWindowBack(this);
}
so every time the window is activate it call the method founded on the first link that I provided. the problem is that the system tray gets sent to the back. let me show you what I mean.
it still is behind everything exept the most important window wich is the windows start up menu. How can I resolve this. why is it going in front of the system tray !?
Upvotes: 0
Views: 4052
Reputation: 36050
After 2 hours of stubbornness I figured it out... Since the window was so big for some reason that happen (gadget was bigger than entire desktop). I made it smaller and it worked.
Upvotes: 2