In This Article

BarMenuPanel Class

Represents a Panel control with layout logic for menu items, hosted in numerous bar controls that display menus.

public class BarMenuPanel : Panel
Inheritance:
object Visual UIElement FrameworkElement Panel object

Constructors

BarMenuPanel()

Initializes an instance of the class.

public BarMenuPanel()

Properties

HasLogicalOrientation

Gets a value that indicates whether this Panel arranges its descendants in a single dimension.

protected override bool HasLogicalOrientation { get; }

Property Value

bool:

true if the orientation of the Panel is in one dimension; otherwise, false.

LogicalOrientation

The Orientation of the panel, if the panel supports layout in only a single dimension.

protected override Orientation LogicalOrientation { get; }

Property Value

Orientation:

The Orientation of the panel. This property has no default value.

Methods

ArrangeOverride(Size)

When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

Size:

The actual size used.

MeasureOverride(Size)

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

protected override Size MeasureOverride(Size constraint)
Parameter Type Description
constraint Size

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of child element sizes.

OnRender(DrawingContext)

Draws the content of a DrawingContext object during the render pass of a Panel element.

protected override void OnRender(DrawingContext drawingContext)
Parameter Type Description
drawingContext DrawingContext