IBarControl Interface
Provides the base requirements for a control that can contain bar command links.
public interface IBarControl : IBarObject, IDpiAwareElement, IOrientedElement
Properties
CommandLinks
Gets the BarCommandLinkCollection containing the command links for use in the control.
BarCommandLinkCollection CommandLinks { get; }
Property Value
- BarCommandLinkCollection:
The BarCommandLinkCollection containing the command links for use in the control.
Control
Gets the Control that contains the IBarControl.
DisplayOrientation
Gets the current display orientation of the bar control, if docked.
Orientation DisplayOrientation { get; }
Property Value
- Orientation:
A Orientation that specifies the orientation.
DisplayStyle
Gets the display style of command links in the bar control.
BarControlDisplayStyle DisplayStyle { get; }
Property Value
- BarControlDisplayStyle:
A BarControlDisplayStyle that specifies the display style.
Guid
Gets a GUID that uniquely identifies the IBarControl.
HasGripper
Gets whether the bar control has a gripper.
bool HasGripper { get; }
Property Value
- bool:
true
if the bar control has a gripper; otherwise,false
.
InCustomizeMode
Gets 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
Gets 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
Gets whether the control is on a popup.
IsRightToLeft
Gets 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
Gets the current layout orientation of the bar control, if docked.
Orientation LayoutOrientation { get; }
Property Value
- Orientation:
A Orientation that specifies the orientation.
LayoutStyle
Gets the layout style of command links in the bar control.
BarControlLayoutStyle LayoutStyle { get; }
Property Value
- BarControlLayoutStyle:
A BarControlLayoutStyle that specifies the layout style.
OwnerCommandLink
Gets the BarCommandLink that owns the bar control, if on a popup.
BarCommandLink OwnerCommandLink { get; }
Property Value
- BarCommandLink:
The BarCommandLink that owns the bar control, if on a popup.
OwnerCommandLinkDisplaySide
Gets or sets the side of the OwnerCommandLink that the bar control is displayed, if on a popup.
RendererResolved
Gets the IBarRenderer used to render the control.
IBarRenderer RendererResolved { get; }
Property Value
- IBarRenderer:
The IBarRenderer used to render the control.
Remarks
This property will return a global renderer if there is no control instance renderer override.
ScreenBounds
Gets the screen bounds of the control.
Rectangle ScreenBounds { get; }
Property Value
- Rectangle:
A
Rectangle
specifying the screen bounds of the control.
SelectedCommandLink
Gets or sets the selected BarCommandLink.
BarCommandLink SelectedCommandLink { get; set; }
Property Value
- BarCommandLink:
The selected 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 |
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 | A |
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()