Reputation: 5469
I have a main Window
and several UserControls
, that show in the same position (one on the other).
How can I adjust the newly opened UserControl
to appear at the very top?
With what I have now, if one of them is opened, and another is opening, the new one goes to the bottom.
Upvotes: 1
Views: 1438
Reputation: 36775
Use the ZIndex-property to set the Z-Index in supporting containers (Canvas
). In Grid-controls, the last added element will be the topmost one (implicit ZIndex
).
Upvotes: 3
Reputation: 2428
Try Visibility
property. Put it Collapsed
if you want to hide it, and Visible
to show again.
On MSDN: http://msdn.microsoft.com/en-us/library/system.windows.uielement.visibility(v=VS.90).aspx
Upvotes: 1