RelativePanel.AboveProperty 屬性

定義

識別 RelativePanel.Above XAML 附加屬性。

public:
 static property DependencyProperty ^ AboveProperty { DependencyProperty ^ get(); };
static DependencyProperty AboveProperty();
public static DependencyProperty AboveProperty { get; }
var dependencyProperty = RelativePanel.aboveProperty;
Public Shared ReadOnly Property AboveProperty As DependencyProperty

屬性值

RelativePanel.Above XAML 附加屬性的識別碼。

範例

// To remove a value, pass null.
Button1.SetValue(RelativePanel.AboveProperty, null);

// To set a value. (Sets Button1 above Button2.)
Button1.SetValue(RelativePanel.AboveProperty, Button2); 

// To get a value. (elementName == "Button2" when set as shown previously.)
string elementName = (string)Button1.GetValue(RelativePanel.AboveProperty);

備註

此屬性只是屬性系統的識別碼,而且不會在大部分的應用程式案例中使用。 在大部分情況下,您會在 XAML 中設定 RelativePanel.Above XAML 附加屬性,而且不需要此識別碼。

若要在程式碼中存取RelativePanel.Above附加屬性,您可以使用相依性屬性系統、呼叫GetValue 或 SetValue,並將 RelativePanel.AboveProperty 傳遞為相依性屬性識別碼。 另一種在程式碼中取得或設定值的方式是使用 GetAboveSetAbove

適用於

另請參閱