Table of Contents

Class RelativePanel

Namespace
Avalonia.Controls
Assembly
Avalonia.Controls.dll

Defines an area within which you can position and align child objects in relation to each other or the parent panel.

public class RelativePanel : Panel, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, IChildIndexProvider
Inheritance
RelativePanel
Implements
Inherited Members
Extension Methods

Constructors

RelativePanel()

public RelativePanel()

Fields

AboveProperty

Identifies the AboveProperty XAML attached property.

public static readonly AttachedProperty<object> AboveProperty

Field Value

AttachedProperty<object>

AlignBottomWithPanelProperty

Identifies the AlignBottomWithPanelProperty XAML attached property.

public static readonly AttachedProperty<bool> AlignBottomWithPanelProperty

Field Value

AttachedProperty<bool>

AlignBottomWithProperty

Identifies the AlignBottomWithProperty XAML attached property.

public static readonly AttachedProperty<object> AlignBottomWithProperty

Field Value

AttachedProperty<object>

AlignHorizontalCenterWithPanelProperty

Identifies the AlignHorizontalCenterWithPanelProperty XAML attached property.

public static readonly AttachedProperty<bool> AlignHorizontalCenterWithPanelProperty

Field Value

AttachedProperty<bool>

AlignHorizontalCenterWithProperty

Identifies the AlignHorizontalCenterWithProperty XAML attached property.

public static readonly AttachedProperty<object> AlignHorizontalCenterWithProperty

Field Value

AttachedProperty<object>

AlignLeftWithPanelProperty

Identifies the AlignLeftWithPanelProperty XAML attached property.

public static readonly AttachedProperty<bool> AlignLeftWithPanelProperty

Field Value

AttachedProperty<bool>

AlignLeftWithProperty

Identifies the AlignLeftWithProperty XAML attached property.

public static readonly AttachedProperty<object> AlignLeftWithProperty

Field Value

AttachedProperty<object>

AlignRightWithPanelProperty

Identifies the AlignRightWithPanelProperty XAML attached property.

public static readonly AttachedProperty<bool> AlignRightWithPanelProperty

Field Value

AttachedProperty<bool>

AlignRightWithProperty

Identifies the AlignRightWithProperty XAML attached property.

public static readonly AttachedProperty<object> AlignRightWithProperty

Field Value

AttachedProperty<object>

AlignTopWithPanelProperty

Identifies the AlignTopWithPanelProperty XAML attached property.

public static readonly AttachedProperty<bool> AlignTopWithPanelProperty

Field Value

AttachedProperty<bool>

AlignTopWithProperty

Identifies the AlignTopWithProperty XAML attached property.

public static readonly AttachedProperty<object> AlignTopWithProperty

Field Value

AttachedProperty<object>

AlignVerticalCenterWithPanelProperty

Identifies the AlignVerticalCenterWithPanelProperty XAML attached property.

public static readonly AttachedProperty<bool> AlignVerticalCenterWithPanelProperty

Field Value

AttachedProperty<bool>

AlignVerticalCenterWithProperty

Identifies the AlignVerticalCenterWithProperty XAML attached property.

public static readonly AttachedProperty<object> AlignVerticalCenterWithProperty

Field Value

AttachedProperty<object>

BelowProperty

Identifies the BelowProperty XAML attached property.

public static readonly AttachedProperty<object> BelowProperty

Field Value

AttachedProperty<object>

LeftOfProperty

Identifies the LeftOfProperty XAML attached property.

public static readonly AttachedProperty<object> LeftOfProperty

Field Value

AttachedProperty<object>

RightOfProperty

Identifies the RightOfProperty XAML attached property.

public static readonly AttachedProperty<object> RightOfProperty

Field Value

AttachedProperty<object>

Methods

ArrangeOverride(Size)

Positions child elements as part of a layout pass.

protected override Size ArrangeOverride(Size arrangeSize)

Parameters

arrangeSize Size

Returns

Size

The actual size used.

GetAbove(AvaloniaObject)

Gets the value of the RelativePanel.Above XAML attached property for the target element.

[ResolveByName]
public static object GetAbove(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The RelativePanel.Above XAML attached property value of the specified object. (The element to position this element above.)

GetAlignBottomWith(AvaloniaObject)

Gets the value of the RelativePanel.AlignBottomWith XAML attached property for the target element.

[ResolveByName]
public static object GetAlignBottomWith(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The RelativePanel.AlignBottomWith XAML attached property value of the specified object. (The element to align this element's bottom edge with.)

GetAlignBottomWithPanel(AvaloniaObject)

Gets the value of the RelativePanel.AlignBottomWithPanel XAML attached property for the target element.

public static bool GetAlignBottomWithPanel(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

bool

The RelativePanel.AlignBottomWithPanel XAML attached property value of the specified object. (true to align this element's bottom edge with the panel's bottom edge; otherwise, false.)

GetAlignHorizontalCenterWith(AvaloniaObject)

Gets the value of the RelativePanel.AlignHorizontalCenterWith XAML attached property for the target element.

[ResolveByName]
public static object GetAlignHorizontalCenterWith(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The RelativePanel.AlignHorizontalCenterWith XAML attached property value of the specified object. (The element to align this element's horizontal center with.)

GetAlignHorizontalCenterWithPanel(AvaloniaObject)

Gets the value of the RelativePanel.AlignHorizontalCenterWithPanel XAML attached property for the target element.

public static bool GetAlignHorizontalCenterWithPanel(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

bool

The RelativePanel.AlignHorizontalCenterWithPanel XAML attached property value of the specified object. (true to horizontally center this element in the panel; otherwise, false.)

GetAlignLeftWith(AvaloniaObject)

Gets the value of the RelativePanel.AlignLeftWith XAML attached property for the target element.

[ResolveByName]
public static object GetAlignLeftWith(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The RelativePanel.AlignLeftWith XAML attached property value of the specified object. (The element to align this element's left edge with.)

GetAlignLeftWithPanel(AvaloniaObject)

Gets the value of the RelativePanel.AlignLeftWithPanel XAML attached property for the target element.

public static bool GetAlignLeftWithPanel(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

bool

The RelativePanel.AlignLeftWithPanel XAML attached property value of the specified object. (true to align this element's left edge with the panel's left edge; otherwise, false.)

GetAlignRightWith(AvaloniaObject)

Gets the value of the RelativePanel.AlignRightWith XAML attached property for the target element.

[ResolveByName]
public static object GetAlignRightWith(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The RelativePanel.AlignRightWith XAML attached property value of the specified object. (The element to align this element's right edge with.)

GetAlignRightWithPanel(AvaloniaObject)

Gets the value of the RelativePanel.AlignRightWithPanel XAML attached property for the target element.

public static bool GetAlignRightWithPanel(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

bool

The RelativePanel.AlignRightWithPanel XAML attached property value of the specified object. (true to align this element's right edge with the panel's right edge; otherwise, false.)

GetAlignTopWith(AvaloniaObject)

Gets the value of the RelativePanel.AlignTopWith XAML attached property for the target element.

[ResolveByName]
public static object GetAlignTopWith(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The value to set. (The element to align this element's top edge with.)

GetAlignTopWithPanel(AvaloniaObject)

Gets the value of the RelativePanel.AlignTopWithPanel XAML attached property for the target element.

public static bool GetAlignTopWithPanel(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

bool

The RelativePanel.AlignTopWithPanel XAML attached property value of the specified object. (true to align this element's top edge with the panel's top edge; otherwise, false.)

GetAlignVerticalCenterWith(AvaloniaObject)

Gets the value of the RelativePanel.AlignVerticalCenterWith XAML attached property for the target element.

[ResolveByName]
public static object GetAlignVerticalCenterWith(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The value to set. (The element to align this element's vertical center with.)

GetAlignVerticalCenterWithPanel(AvaloniaObject)

Gets the value of the RelativePanel.AlignVerticalCenterWithPanel XAML attached property for the target element.

public static bool GetAlignVerticalCenterWithPanel(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

bool

The RelativePanel.AlignVerticalCenterWithPanel XAML attached property value of the specified object. (true to vertically center this element in the panel; otherwise, false.)

GetBelow(AvaloniaObject)

Gets the value of the RelativePanel.Below XAML attached property for the target element.

[ResolveByName]
public static object GetBelow(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The RelativePanel.Below XAML attached property value of the specified object. (The element to position this element below.)

GetLeftOf(AvaloniaObject)

Gets the value of the RelativePanel.LeftOf XAML attached property for the target element.

[ResolveByName]
public static object GetLeftOf(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The RelativePanel.LeftOf XAML attached property value of the specified object. (The element to position this element to the left of.)

GetRightOf(AvaloniaObject)

Gets the value of the RelativePanel.RightOf XAML attached property for the target element.

[ResolveByName]
public static object GetRightOf(AvaloniaObject obj)

Parameters

obj AvaloniaObject

The object from which the property value is read.

Returns

object

The RelativePanel.RightOf XAML attached property value of the specified object. (The element to position this element to the right of.)

MeasureOverride(Size)

Measures the control and its child elements as part of a layout pass.

protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize Size

The size available to the control.

Returns

Size

The desired size for the control.

SetAbove(AvaloniaObject, object)

Sets the value of the RelativePanel.Above XAML attached property for a target element.

[ResolveByName]
public static void SetAbove(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to position this element above.)

SetAlignBottomWith(AvaloniaObject, object)

Sets the value of the RelativePanel.Above XAML attached property for a target element.

[ResolveByName]
public static void SetAlignBottomWith(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to align this element's bottom edge with.)

SetAlignBottomWithPanel(AvaloniaObject, bool)

Sets the value of the RelativePanel.Above XAML attached property for a target element.

public static void SetAlignBottomWithPanel(AvaloniaObject obj, bool value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value bool

The value to set. (true to align this element's bottom edge with the panel's bottom edge; otherwise, false.)

SetAlignHorizontalCenterWith(AvaloniaObject, object)

Sets the value of the RelativePanel.Above XAML attached property for a target element.

[ResolveByName]
public static void SetAlignHorizontalCenterWith(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to align this element's horizontal center with.)

SetAlignHorizontalCenterWithPanel(AvaloniaObject, bool)

Sets the value of the RelativePanel.Above XAML attached property for a target element.

public static void SetAlignHorizontalCenterWithPanel(AvaloniaObject obj, bool value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value bool

The value to set. (true to horizontally center this element in the panel; otherwise, false.)

SetAlignLeftWith(AvaloniaObject, object)

Sets the value of the RelativePanel.Above XAML attached property for a target element.

[ResolveByName]
public static void SetAlignLeftWith(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to align this element's left edge with.)

SetAlignLeftWithPanel(AvaloniaObject, bool)

Sets the value of the RelativePanel.Above XAML attached property for a target element.

public static void SetAlignLeftWithPanel(AvaloniaObject obj, bool value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value bool

The value to set. (true to align this element's left edge with the panel's left edge; otherwise, false.)

SetAlignRightWith(AvaloniaObject, object)

Sets the value of the RelativePanel.AlignRightWith XAML attached property for a target element.

[ResolveByName]
public static void SetAlignRightWith(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to align this element's right edge with.)

SetAlignRightWithPanel(AvaloniaObject, bool)

Sets the value of the RelativePanel.Above XAML attached property for a target element.

public static void SetAlignRightWithPanel(AvaloniaObject obj, bool value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value bool

The value to set. (true to align this element's right edge with the panel's right edge; otherwise, false.)

SetAlignTopWith(AvaloniaObject, object)

Sets the value of the RelativePanel.AlignTopWith XAML attached property for a target element.

[ResolveByName]
public static void SetAlignTopWith(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to align this element's top edge with.)

SetAlignTopWithPanel(AvaloniaObject, bool)

Sets the value of the RelativePanel.AlignTopWithPanel XAML attached property for a target element.

public static void SetAlignTopWithPanel(AvaloniaObject obj, bool value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value bool

The value to set. (true to align this element's top edge with the panel's top edge; otherwise, false.)

SetAlignVerticalCenterWith(AvaloniaObject, object)

Sets the value of the RelativePanel.AlignVerticalCenterWith XAML attached property for a target element.

[ResolveByName]
public static void SetAlignVerticalCenterWith(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to align this element's horizontal center with.)

SetAlignVerticalCenterWithPanel(AvaloniaObject, bool)

Sets the value of the RelativePanel.AlignVerticalCenterWithPanel XAML attached property for a target element.

public static void SetAlignVerticalCenterWithPanel(AvaloniaObject obj, bool value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value bool

The value to set. (true to vertically center this element in the panel; otherwise, false.)

SetBelow(AvaloniaObject, object)

Sets the value of the RelativePanel.Above XAML attached property for a target element.

[ResolveByName]
public static void SetBelow(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to position this element below.)

SetLeftOf(AvaloniaObject, object)

Sets the value of the RelativePanel.LeftOf XAML attached property for a target element.

[ResolveByName]
public static void SetLeftOf(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to position this element to the left of.)

SetRightOf(AvaloniaObject, object)

Sets the value of the RelativePanel.RightOf XAML attached property for a target element.

[ResolveByName]
public static void SetRightOf(AvaloniaObject obj, object value)

Parameters

obj AvaloniaObject

The object to which the property value is written.

value object

The value to set. (The element to position this element to the right of.)