Gets a value that indicates whether a band is being dragged.
true if a band is currently being dragged; otherwise, false.
The DragBand and DragBandComplete events are raised when the value of this property is changed to true and false, respectively.
You can use the DragBand property to determine which band is being dragged.
This example handles the DragBand, DragBandComplete and DrawBand events of a Rebar control. It demonstrates two things:
This example requires the following:
private void rebar_DragBand(object sender, Skybound.Rebar.RebarBandEventArgs e) { // set status bar text to the text on the band: statusBar.Text = e.Band.Text; // force band to repaint: e.Band.Refresh(); } private void rebar_DragBandComplete(object sender, Skybound.Rebar.RebarBandEventArgs e) { // clear status bar text: statusBar.Text = ""; // force band to repaint: e.Band.Refresh(); } private void rebar_DrawBand(object sender, Skybound.Rebar.DrawBandEventArgs e) { // ensure that a band is dragging, and that the band we are drawing is being dragged: if (rebar.IsDragging && rebar.DraggingBand == e.Band) { // fill background of band with a semi-transparent brush, based on the system highlight color using (SolidBrush brush = new SolidBrush(Color.FromArgb(96, SystemColors.Highlight))) e.Graphics.FillRectangle(brush, e.Renderer.Bounds); } // call default implementation to render the band: e.Renderer.RenderBand(e.Graphics); }
Rebar Class | Skybound.Rebar Namespace