I simply have two grid on top of one another. Given one state of the world, I want grid A to be on top, given another state of the world, I want grid B to be on top. In the old days we could just call grid.BringToFront(), but that doesn't exist anymore, and I can't figure out any way to make that happen.
The best I can figure, I need to create my own custom classes to allow this functionality, but that seems like major overkill for something that used to be so simple.
-
You can use the Panel.ZIndex property to change the display order of elements in a panel
http://msdn.microsoft.com/en-us/library/system.windows.controls.panel.zindex.aspx
-
A detailed example is here: http://blogs.msdn.com/b/wpfsdk/archive/2006/06/13/controlling-zorder-using-the-zindex-property.aspx
0 comments:
Post a Comment