views:

35

answers:

1

I am currently working on WPF touch-screen application. I am developing it on Windows XP machine. I have tested it on this machine and it works perfectly fine. But when I deploy it to Windows Embedded machine I start to get strange behaviour: all pop up messages, drop down list, context menus appear behind the main window.

I am also setting the focus on my main window, when application loads, to enable context menu on the main screen.

Also my main window's AllowTransparency is set to true, (I have seen people had similar issues when having set to AllowTransparency). And also this didn't happen in the previous release.

Edit: The issues has gone after several compilations, I was unable to reproduce it, but I am still trying. I also think it has to be something related to graphic driver, as it happens on one windows XP machine, but not on another (hardware is different, one run XP embedded 2nd XP professional).

Any idea why this is happening?

+1  A: 

Have you tried forcing the ZIndex of the elements to that they are higher than the main window?

This MSDN blog post describes it's use - but the important part might be:

The first set of Rectangle objects uses the default z-ordering rendering of objects, which is based on the position of the child object in the Canvas collection

So if the order the objects are created has changed (for whatever reason) you might see this behaviour.

Explicitly setting the ZIndex will confirm or deny this.

ChrisF
I would like to try it, but after several compilations, the issues has gone. I was trying to reproduce it, but with no luck. I have altered very insignificant amount of code, so I am still trying to find what might produce the error.
Vitalij
But are you able to set the Z-index on the drop down menu items list? Or does it inherit the z-index which you set on the drop down menu. Because I thought you can't change the z-order of the controls inside of the standard controls. And what I get is a drop down list which is displayed properly, but as soon as you click it, the menu list rolls down, but behind the application window.
Vitalij
@Vitali - I don't know, which is why I proposed it as something to try. I was originally just going to comment, but realised there was more information than would sensibly fit.
ChrisF
Thanks anyway, eliminating possibilities is always a good thing. If I will reproduce the error I will try your suggestion.
Vitalij