Canvas.GetZIndex(UIElement) 方法

定義

取得目標專案的 Canvas.ZIndex XAML 附加屬性的值。

public:
 static int GetZIndex(UIElement ^ element);
 static int GetZIndex(UIElement const& element);
public static int GetZIndex(UIElement element);
function getZIndex(element)
Public Shared Function GetZIndex (element As UIElement) As Integer

參數

element
UIElement

要讀取屬性值的物件。

傳回

Int32

int

所要求物件的 Canvas.ZIndex XAML 附加屬性值。

備註

這個方法是屬性系統的公用程式方法,而且不會在大部分的應用程式案例中使用。 在大部分情況下,您會在 XAML 中設定 Canvas.ZIndex XAML 附加屬性,而且不需要此方法。 如需詳細資訊,請參閱 Canvas.ZIndex 附加屬性。

適用於