In This Article

IBarControl Interface

Provides the base requirements for a control that can contain bar command links.

public interface IBarControl : IBarObject, IDpiAwareElement, IOrientedElement

Properties

The BarCommandLinkCollection containing the command links for use in the control.

BarCommandLinkCollection? CommandLinks { get; }

Property Value

BarCommandLinkCollection

Control

The Control that contains the IBarControl.

Control? Control { get; }

Property Value

Control

DisplayOrientation

The current display orientation of the bar control, if docked.

Orientation DisplayOrientation { get; }

Property Value

Orientation

DisplayStyle

The display style of command links in the bar control.

BarControlDisplayStyle DisplayStyle { get; }

Property Value

BarControlDisplayStyle

Guid

A GUID that uniquely identifies the IBarControl.

string Guid { get; }

Property Value

string

HasGripper

Indicates whether the bar control has a gripper.

bool HasGripper { get; }

Property Value

bool:

true if the bar control has a gripper; otherwise, false.

InCustomizeMode

Indicates whether the bar control is in customize mode.

bool InCustomizeMode { get; }

Property Value

bool:

true if the bar control is in customize mode; otherwise, false.

InDesignMode

Indicates whether the bar control is in design mode.

bool InDesignMode { get; }

Property Value

bool:

true if the bar control is in design mode; otherwise, false.

IsOnPopup

Indicates whether the control is on a popup.

bool IsOnPopup { get; }

Property Value

bool:

true if the control is on a popup; otherwise, false.

IsRightToLeft

Indicates whether the control is using a right-to-left layout.

bool IsRightToLeft { get; }

Property Value

bool:

true if the control is using a right-to-left layout; otherwise, false.

LayoutOrientation

The current layout orientation of the bar control, if docked.

Orientation LayoutOrientation { get; }

Property Value

Orientation

LayoutStyle

The layout style of command links in the bar control.

BarControlLayoutStyle LayoutStyle { get; }

Property Value

BarControlLayoutStyle

The BarCommandLink that owns the bar control, if on a popup.

BarCommandLink? OwnerCommandLink { get; }

Property Value

BarCommandLink

OwnerCommandLinkDisplaySide

The side of the OwnerCommandLink that the bar control is displayed, if on a popup.

Sides OwnerCommandLinkDisplaySide { get; set; }

Property Value

Sides

RendererResolved

The IBarRenderer used to render the control.

IBarRenderer? RendererResolved { get; }

Property Value

IBarRenderer

Remarks

In most cases, this property will return a global renderer if there is no control instance renderer override.

ScreenBounds

The screen bounds of the control.

Rectangle ScreenBounds { get; }

Property Value

Rectangle

The selected BarCommandLink, if any.

BarCommandLink? SelectedCommandLink { get; set; }

Property Value

BarCommandLink

Methods

Close(BarPopupCloseReason)

Closes the IBarControl, if on a popup.

void Close(BarPopupCloseReason closeReason)
Parameter Type Description
closeReason BarPopupCloseReason

A BarPopupCloseReason specifying the close reason.

CloseAllPopups(BarPopupCloseReason)

Closes all active popups.

void CloseAllPopups(BarPopupCloseReason closeReason)
Parameter Type Description
closeReason BarPopupCloseReason

A BarPopupCloseReason specifying the close reason.

CloseChildPopup(BarPopupCloseReason)

Closes the child popup of the IBarControl.

void CloseChildPopup(BarPopupCloseReason closeReason)
Parameter Type Description
closeReason BarPopupCloseReason

A BarPopupCloseReason specifying the close reason.

HitTest(Point)

Hit tests the specified screen Point for a BarCommandLink.

BarCommandLink? HitTest(Point point)
Parameter Type Description
point Point

The screen Point to hit test.

Returns

BarCommandLink:

The BarCommandLink at the specified Point.

Hit tests the specified screen Point for a customize drop target.

BarCustomizeDropTarget? HitTestForCustomizeDropTarget(BarCommandLink? sourceCommandLink, Point point)
Parameter Type Description
sourceCommandLink BarCommandLink

The source BarCommandLink.

point Point

The screen Point to use for hit testing.

Returns

BarCustomizeDropTarget:

A BarCustomizeDropTarget that specifies a customize drop target.

Invalidate(InvalidationLevels, InvalidationTypes)

Invalidates the specified states for the element or its related elements.

void Invalidate(InvalidationLevels levels, InvalidationTypes types)
Parameter Type Description
levels InvalidationLevels

The hierarchy levels at which to invalidate.

types InvalidationTypes

The types of invalidation to perform.

Process(BarProcessEventArgs)

Performs processing based on some sort of event.

void Process(BarProcessEventArgs e)
Parameter Type Description
e BarProcessEventArgs

The event data.

Selects the next command link.

BarCommandLink? SelectNextCommandLink()

Returns

BarCommandLink:

The BarCommandLink that was selected.

Selects the previous command link.

BarCommandLink? SelectPreviousCommandLink()

Returns

BarCommandLink:

The BarCommandLink that was selected.

Update()

Ensures that all invalidated regions of the control are painted.

void Update()

Inherited Members

Extension Methods