views:

270

answers:

2

how can i do my childWindow to be always on top?

+3  A: 

If by ChildWindows you mean the ChildWindow object in Silverlight then it should always appear on top, as the documentation says:

A ChildWindow always displays in a modal popup that blocks user interaction with the underlying user interface.

But if by ChildWindow you mean something else you created in Silverlight then you need to set the ZIndex property of that object to a very big number:

The z-order of an object determines whether the object is in front of or behind another overlapping object. By default, the z-order of objects within a Panel is determined by the sequence in which they are declared. Objects that are declared later appear in front of objects that are declared earlier. You can change this behavior by setting the Canvas..::.ZIndex attached property on objects within the Panel. Higher values are closer to the foreground; lower values are farther from the foreground.

In codebehind you would write:

myObject.SetValue(Canvas.ZIndexProperty, 100); 

and in XAML you would need to write

<Rectangle Canvas.ZIndex="100" />
texmex5
and how can i get teh Z-order?
Edited my post with code-examples for ZIndex property …
texmex5
Was my answer helpful or do you need any more assistance? If not maybe you could mark my answer correct?
texmex5
+1  A: 

Maybe Popup control will help you? http://jesseliberty.com//2008/06/06/popup-control/

Fedor