Assembly: PresentationFramework (in presentationframework.dll)
The element on which to apply the property value.
The order on the z-plane in which this element appears.
The element is a null reference (Nothing in Visual Basic).
The greater the value of a given element, the more likely the element is to appear in the foreground. Likewise, if an element has a relatively low value, the element will likely appear in the background. For example, an element that has a value of five will appear above an element that has a value of four, which in turn will appear above an element that has a value of three, and so on. Negative values are allowed, and they continue this precedence pattern.
Members of a Children collection that have equal ZIndex values are rendered in the order in which they appear in the visual tree. You can determine the index position of a child by iterating the members of the Children collection.
The following example demonstrates in code how to set the value of the ZIndex property (by using the SetZIndex method).
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.