Skybound Rebar

Rebar Class

Represents a Skybound Rebar control.

For a list of all members of this type, see Rebar Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            Skybound.Rebar.Rebar

[Visual Basic]
Public Class Rebar
    Inherits Control
    Implements ISupportInitialize, IMessageFilter
[C#]
public class Rebar : Control, ISupportInitialize, IMessageFilter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Rebar controls are used to display customizable bands that contain one or more buttons. There are various styles of buttons available, such as a push button, toggle-style button, and drop-down buttons. Buttons that do not fit within a band can be accessed through the chevron menu.

The Bands property contains the bands contained in the rebar. At design-time, use the "Add Band" verb on the context menu for the control or below the property grid to add new bands to a rebar. At runtime, use the Add method of the Bands property to add new bands.

The Rows property provides a read-only collection of rows on the rebar. A row is a horizontal strip of bands. The RebarRow objects contained in this collection should not be cached because as the location and order of bands is changed at runtime, the RebarRow objects contained in the collection may be added or removed automatically.

There are two types of rebar bands: MenuBar and ToolBar. MenuBar bands can only contain menu buttons, whereas ToolBar buttons can contain buttons of any type. Furthermore, mnemonics for accelerator keys are only used on MenuBar bands.

A RebarTheme determines how a Rebar control is drawn, and each Rebar control may be assigned its own theme using the Theme property. Alternately, you may assign a theme using the static (Shared in Visual Basic) SetDefault method of RebarTheme to have all Rebar controls use the same theme.

Set the HotLightEffect property to automatically apply effects to the images on the buttons as the mouse passes over them. For example, use the Intensify property to simulate Windows XP-style image highlighting. Borders can also be hidden by setting the BordersVisible property to false.

Rebar controls may also display animated logos which applications may use to indicate execution of a lengthy operation. For example, most web browsers use an animated logo to indicate when a web page is being downloaded. Assign a logo using the Logo property, and then turn animation on and off using the AnimateLogo property.

Customize the way bands are drawn on a rebar by setting the DrawMode property to OwnerDraw and handling the DrawBand event.

Using the size-grip on the side of the band, it can be dragged to a new location. The Rebar control also provides a set of events for determining when a band is being dragged:

Event Description
DragBand Raised before a band is about to be dragged to a new location.
DragBandComplete Raised after a band has been dragged to a new location.

Requirements

Namespace: Skybound.Rebar

Assembly: Skybound.Rebar (in Skybound.Rebar.dll)

See Also

Rebar Members | Skybound.Rebar Namespace