Class ScrollBarCustomDraw
Base class for scrollers control that support visual styles.
Inheritance
System.Object
ScrollBarCustomDraw
Assembly: Syncfusion.Shared.Base.dll
public class ScrollBarCustomDraw : ContainerControl
Constructors
Declaration
public ScrollBarCustomDraw()
Fields
Declaration
protected int m_cachedLargeChange
Field Value
To prevent validation controls visibility in
and in .
Declaration
protected bool m_IsSetControlsVisiblity
Field Value
A value to be added to or subtracted from the System.Windows.Forms.ScrollBar.Value
property when the scroll box is moved a large distance.
Declaration
protected int m_largeChange
Field Value
Position where was last click.
Declaration
protected Point m_lastPressedPoint
Field Value
Type |
System.Drawing.Point |
The upper limit of values of the scrollable range.
Declaration
Field Value
Instance of ContextMenu provider.
Declaration
protected IContextMenuProvider m_MenuProvider
Field Value
The lower limit of values of the scrollable range.
Declaration
Field Value
To avoid compile error CS0197 in VS2002.
Declaration
protected Point m_ptLocation
Field Value
Type |
System.Drawing.Point |
Array of rectangles that represents regions of the ScrollBarCustomDraw.
Declaration
protected Rectangle[] m_rects
Field Value
Type |
System.Drawing.Rectangle[] |
A value to be added to or subtracted from the Syncfusion.Windows.Forms.ScrollBarCustomDraw.Value
property when the scroll box is moved a small distance.
Declaration
protected int m_smallChange
Field Value
A numeric value that represents the current position of the
scroll box on the scroll bar control.
Declaration
Field Value
Properties
Declaration
protected bool AttachedToListView { get; }
Property Value
Gets / sets the menu provider object that will implement the ScrollBarCustomDraw's contextmenu.
Declaration
public IContextMenuProvider ContextMenuProvider { get; set; }
Property Value
Hide Controls collection from CodeDom serialization.
Declaration
public Control.ControlCollection Controls { get; }
Property Value
Type |
System.Windows.Forms.Control.ControlCollection |
Collection of controls that locates under the maximum arrow.
Declaration
public ControlsCollection ControlsAfter { get; }
Property Value
Collection of controls that locates above the minimum arrow.
Declaration
public ControlsCollection ControlsBefore { get; }
Property Value
Gets or sets a value that indicates whether maximum arrow is disabled.
Declaration
public bool DisableMaximumArrow { get; set; }
Property Value
Gets or sets a value that indicates whether minimum arrow is disabled.
Declaration
public bool DisableMinimumArrow { get; set; }
Property Value
Gets or sets a value that indicates whether thumb is disabled.
Declaration
public bool DisableThumb { get; set; }
Property Value
Returns the value that indicates whether RightToLeft is RightToLeft.Yes
Declaration
protected bool IsRtl { get; }
Property Value
True - say control to keep System settings instead of user defined, otherwise False.
Declaration
public bool KeepSystemMetrics { get; set; }
Property Value
Gets or sets a value to be added to or subtracted from the System.Windows.Forms.ScrollBar.Value
property when the scroll box is moved a large distance.
Declaration
public int LargeChange { get; set; }
Property Value
Gets or sets the upper limit of values of the scrollable range.
Declaration
public int Maximum { get; set; }
Property Value
Gets or sets whether the Metro color scheme should be user defined color.
Declaration
public MetroColorScheme MetroColorScheme { get; set; }
Property Value
Gets or sets the metro color table.
Declaration
public MetroColorTable MetroColorTable { get; set; }
Property Value
Gets or sets the lower limit of values of the scrollable range.
Declaration
public int Minimum { get; set; }
Property Value
Gets or sets whether the Office2010 color scheme should be Silver or Blue or Black.
Declaration
public Office2010ColorScheme Office2010ColorScheme { get; set; }
Property Value
Gets or sets the color table for Office2016 Black theme scrollbar.
Declaration
public MetroColorTable Office2016BlackColorTable { get; set; }
Property Value
Gets or sets the color table for Office2016 colorful theme scrollbar.
Declaration
public MetroColorTable Office2016ColorfulColorTable { get; set; }
Property Value
Gets or sets whether the Office2016 color scheme should be Black or White or DarkGray or Colorful.
Declaration
public ScrollBarOffice2016ColorScheme Office2016ColorScheme { get; set; }
Property Value
Gets or sets the color table for Office2016 dark gray theme scrollbar.
Declaration
public MetroColorTable Office2016DarkGrayColorTable { get; set; }
Property Value
Gets or sets the color table for Office2016 white theme scrollbar.
Declaration
public MetroColorTable Office2016WhiteColorTable { get; set; }
Property Value
Gets or sets whether the Office color scheme should be Silver or Blue or Black.
Declaration
public Office2007ColorScheme OfficeColorScheme { get; set; }
Property Value
Gets or sets value indicating whether scrollbar should be refreshed on each value change.
If set to false, scrollbar is invalidated only and therefore is visually refreshed after processing all scrolling messages.
Declaration
public bool RefreshOnValueChange { get; set; }
Property Value
Gets or sets a value to be added to or subtracted from the Syncfusion.Windows.Forms.ScrollBarCustomDraw.Value
property when the scroll box is moved a small distance.
Declaration
public int SmallChange { get; set; }
Property Value
Text
Gets or sets the text associated with this control.
Declaration
public override string Text { get; set; }
Property Value
Gets or sets a value that indicates whether to use visual styles.
Declaration
public bool ThemeEnabled { get; set; }
Property Value
Gets or sets a numeric value that represents the current position of the
scroll box on the scroll bar control.
Declaration
public int Value { get; set; }
Property Value
Visual style of the ScrollBarCustomDraw.
Declaration
public ScrollBarCustomDrawStyles VisualStyle { get; set; }
Property Value
Methods
Method accumulate width and height of the controls in
specified collection.
Declaration
protected Size Accumulate(ControlsCollection collection)
Parameters
Returns
Type |
Description |
System.Drawing.Size |
Accumulated values.
|
used for calculates thumb offset.
Declaration
protected virtual void CalculatedDelta(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Utility API that open to user opportunity to destroy handle in runtime.
Very usefull for runtime resource cleanup.
Declaration
Gets DockStyle of afterControls.
Declaration
protected virtual DockStyle GetAfterControlsDockStyle()
Returns
Type |
System.Windows.Forms.DockStyle |
Gets DockStyle of beforeControls.
Declaration
protected virtual DockStyle GetBeforeControlsDockStyle()
Returns
Type |
System.Windows.Forms.DockStyle |
Gets max button. Possible variants: Right or Up.
Declaration
protected virtual ScrollButton GetMaxButton()
Returns
Type |
System.Windows.Forms.ScrollButton |
Gets min button. Possible variants: Left or Down.
Declaration
protected virtual ScrollButton GetMinButton()
Returns
Type |
System.Windows.Forms.ScrollButton |
Declaration
protected virtual PressedZone HitTest(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
Returns
If scroll contain all controls than controls is visible, in other case value is false.
Declaration
protected virtual bool IsControlsVisible()
Returns
Forces the laying out of combobox elements.
Declaration
public virtual void Layout()
Declaration
protected virtual void OnAfterControlConfigure(object sender, ConfigureControlEventArgs e)
Parameters
Declaration
protected virtual void OnAfterControlConfigure(Control control)
Parameters
Type |
Name |
Description |
System.Windows.Forms.Control |
control |
|
Declaration
protected virtual void OnBeforeControlConfigure(object sender, ConfigureControlEventArgs e)
Parameters
Declaration
protected virtual void OnBeforeControlConfigure(Control control)
Parameters
Type |
Name |
Description |
System.Windows.Forms.Control |
control |
|
Declaration
protected override void OnControlAdded(ControlEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.ControlEventArgs |
e |
|
Declaration
protected override void OnControlRemoved(ControlEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.ControlEventArgs |
e |
|
Raises the OnLargeChangeChanged event.
Declaration
protected virtual void OnLargeChangeChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
The event data.
|
Override. Force recalculation of Scroller elements.
Declaration
protected override void OnLayout(LayoutEventArgs levent)
Parameters
Type |
Name |
Description |
System.Windows.Forms.LayoutEventArgs |
levent |
Layout arguments.
|
Raises the OnMaximumChanged event.
Declaration
protected virtual void OnMaximumChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
The event data.
|
Declaration
protected virtual void OnMaximumClick(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.EventArgs |
e |
|
Raises the OnMinimumChanged event.
Declaration
protected virtual void OnMinimumChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
The event data.
|
Declaration
protected virtual void OnMinimumClick(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.EventArgs |
e |
|
Overridden. See System.Windows.Forms.Control.OnMouseDown(System.Windows.Forms.MouseEventArgs).
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Declaration
protected override void OnMouseEnter(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Overridden. See System.Windows.Forms.Control.OnMouseLeave(System.EventArgs).
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Overridden. See System.Windows.Forms.Control.OnMouseMove(System.Windows.Forms.MouseEventArgs).
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Overridden. See System.Windows.Forms.Control.OnMouseUp(System.Windows.Forms.MouseEventArgs).
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Occurs when mouse down and cursor change position.
Declaration
protected virtual void OnMovedPositionChanged(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
OnPageDownRightClick(Object, EventArgs)
Declaration
protected virtual void OnPageDownRightClick(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.EventArgs |
e |
|
OnPageUpLeftClick(Object, EventArgs)
Declaration
protected virtual void OnPageUpLeftClick(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.EventArgs |
e |
|
Overridden. See System.Windows.Forms.Control.OnPaint.
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.PaintEventArgs |
e |
|
Redraws scroll control when RightToLeft is changed.
Declaration
protected override void OnRightToLeftChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Declaration
protected virtual void OnScrollDownRightClick(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.EventArgs |
e |
|
Declaration
protected virtual void OnScrollHereClick(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.EventArgs |
e |
|
Declaration
protected virtual void OnScrollUpLeftClick(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.EventArgs |
e |
|
Occurs when control size changed.
Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
The event data.
|
Raises the OnSmallChangeChanged event.
Declaration
protected virtual void OnSmallChangeChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
The event data.
|
Overridden. See System.Windows.Forms.Control.OnSystemColorsChanged(System.EventArgs).
Declaration
protected override void OnSystemColorsChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Raises the OnMinimumChanged event.
Declaration
protected virtual void OnThemeEnabledChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
The event data.
|
Raises the OnValueChanged event.
Declaration
protected virtual void OnValueChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
The event data.
|
Declaration
public virtual int PointToValue(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
Returns
Recalculates bounds of the arrow buttons.
Declaration
protected virtual void RecalculateArrow()
Recalculates bounds of the ScrollBarCustomDraw.
Declaration
protected virtual void RecalculateScroll()
Recalculates bounds of the thumb.
Declaration
protected virtual void RecalculateThumb()
Reset control Width or Heigh to system settings
Declaration
protected virtual void ResetToSystemMetrics()
Excludes/includes controls in Controls collection.
Declaration
protected void SetControlsLayoutVisibility(bool hide)
Parameters
Type |
Name |
Description |
System.Boolean |
hide |
If true - excludes, else includes controls in Controls collection.
|
Sets small change if value is less than large change; otherwise sets small change to large change.
Declaration
public void SetSafeSmallChange(int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
Value to set.
|
Declaration
protected bool ShouldSerializeControlsAfter()
Returns
Declaration
protected bool ShouldSerializeControlsBefore()
Returns
Used for validating visibility of the ControlsAfter and ControlsBefore
Declaration
protected virtual void ValidateControlsVisibility()
Declaration
[Obsolete]
public virtual Point ValueToPoint(int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
Returns
Type |
System.Drawing.Point |
Events
Declaration
public event EventHandler ColorSchemeChanged
Event Type
Declaration
public event EventHandler LargeChangeChanged
Event Type
Declaration
public event EventHandler MaximumChanged
Event Type
Declaration
public event EventHandler MinimumChanged
Event Type
Declaration
public event EventHandler SmallChangeChanged
Event Type
Declaration
public event EventHandler ThemeEnabledChanged
Event Type
Declaration
public event EventHandler ValueChanged
Event Type
Declaration
public event EventHandler VisualStyleChanged
Event Type