Canvas.SetZIndex(UIElement, Int32) 方法

定義

設定目標專案的 Canvas.ZIndex XAML 附加屬性的值。

public:
 static void SetZIndex(UIElement ^ element, int value);
 static void SetZIndex(UIElement const& element, int const& value);
public static void SetZIndex(UIElement element, int value);
function setZIndex(element, value)
Public Shared Sub SetZIndex (element As UIElement, value As Integer)

參數

element
UIElement

要寫入屬性值的物件。

value
Int32

int

要設定的值。

備註

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

適用於

另請參閱