IBarControl Interface
Provides the base requirements for a control that can contain bar command links.
public interface IBarControl : IBarObject, IDpiAwareElement, IOrientedElement
Properties
CommandLinks
The BarCommandLinkCollection containing the command links for use in the control.
Control
The Control that contains the IBarControl.
DisplayOrientation
The current display orientation of the bar control, if docked.
DisplayStyle
The display style of command links in the bar control.
Guid
A GUID that uniquely identifies the IBarControl.
HasGripper
Indicates whether the bar control has a gripper.
bool HasGripper { get; }
Property Value
- bool:
trueif the bar control has a gripper; otherwise,false.
InCustomizeMode
Indicates whether the bar control is in customize mode.
bool InCustomizeMode { get; }
Property Value
- bool:
trueif 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:
trueif the bar control is in design mode; otherwise,false.
IsOnPopup
Indicates whether the control is on a popup.
IsRightToLeft
Indicates whether the control is using a right-to-left layout.
bool IsRightToLeft { get; }
Property Value
- bool:
trueif the control is using a right-to-left layout; otherwise,false.
LayoutOrientation
The current layout orientation of the bar control, if docked.
LayoutStyle
The layout style of command links in the bar control.
OwnerCommandLink
The BarCommandLink that owns the bar control, if on a popup.
OwnerCommandLinkDisplaySide
The side of the OwnerCommandLink that the bar control is displayed, if on a popup.
RendererResolved
The IBarRenderer used to render the control.
IBarRenderer? RendererResolved { get; }
Property Value
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.
SelectedCommandLink
The selected BarCommandLink, if any.
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 |
Returns
- BarCommandLink:
The BarCommandLink at the specified
Point.
HitTestForCustomizeDropTarget(BarCommandLink?, 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 |
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. |
SelectNextCommandLink()
Selects the next command link.
BarCommandLink? SelectNextCommandLink()
Returns
- BarCommandLink:
The BarCommandLink that was selected.
SelectPreviousCommandLink()
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
- IBarObject.BarManager
- IDpiAwareElement.DpiScaleChanged(SizeF)
- IDpiAwareElement.DpiScaleFactor
- IOrientedElement.Orientation