Canvas.SetLeft(UIElement, Double) 方法

定義

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

public:
 static void SetLeft(UIElement ^ element, double length);
 static void SetLeft(UIElement const& element, double const& length);
public static void SetLeft(UIElement element, double length);
function setLeft(element, length)
Public Shared Sub SetLeft (element As UIElement, length As Double)

參數

element
UIElement

要寫入屬性值的物件。

length
Double

double

要設定的值。

備註

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

適用於

另請參閱