Class WindowsXPRenderer
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Scrolling.Renderers
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class WindowsXPRenderer : ClassicRenderer, IRenderer
Constructors
WindowsXPRenderer(ScrollBarCustomDraw)
Initialize new instance of WindowsXPRenderer
Declaration
public WindowsXPRenderer(ScrollBarCustomDraw parent)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollBarCustomDraw | parent |
WindowsXPRenderer(Boolean)
Initialize new instance of WindowsXPRenderer
Declaration
protected WindowsXPRenderer(bool isVerticalScrollBar)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | isVerticalScrollBar |
Fields
DEF_BORDERS_RADIUS
Default radius truncation corners.
Declaration
protected const int DEF_BORDERS_RADIUS = 1
Field Value
| Type |
|---|
| System.Int32 |
DEF_COUNT_OF_LINES
Count of lines on the thumb.
Declaration
protected const int DEF_COUNT_OF_LINES = 8
Field Value
| Type |
|---|
| System.Int32 |
DEF_HEIGHT_BRUSH
Height for brush.
Declaration
protected const int DEF_HEIGHT_BRUSH = 1
Field Value
| Type |
|---|
| System.Int32 |
DEF_HEIGHT_OF_LINES
Height of lines on the thumb.
Declaration
protected const int DEF_HEIGHT_OF_LINES = 5
Field Value
| Type |
|---|
| System.Int32 |
DEF_HORIZONTAL_BRUSH_ANGLE
Angle for horizontal gradient brush.
Declaration
protected const float DEF_HORIZONTAL_BRUSH_ANGLE = 90F
Field Value
| Type |
|---|
| System.Single |
DEF_SLOPING_BRUSH_ANGLE
Angle for vertical gradient brush.
Declaration
protected const float DEF_SLOPING_BRUSH_ANGLE = 53F
Field Value
| Type |
|---|
| System.Single |
DEF_VERTICAL_BRUSH_ANGLE
Angle for vertical gradient brush.
Declaration
protected const float DEF_VERTICAL_BRUSH_ANGLE = 0F
Field Value
| Type |
|---|
| System.Single |
DEF_WIDTH_BRUSH
Width for brush.
Declaration
protected const int DEF_WIDTH_BRUSH = 1
Field Value
| Type |
|---|
| System.Int32 |
m_iBottom
Declaration
protected float m_iBottom
Field Value
| Type |
|---|
| System.Single |
m_iLeft
Declaration
protected float m_iLeft
Field Value
| Type |
|---|
| System.Single |
m_iRight
Declaration
protected float m_iRight
Field Value
| Type |
|---|
| System.Single |
m_iTop
Declaration
protected float m_iTop
Field Value
| Type |
|---|
| System.Single |
Properties
ColorScheme
The color scheme that the renderer will render.
Declaration
public WindowsXPColorsScheme ColorScheme { get; set; }
Property Value
| Type |
|---|
| WindowsXPColorsScheme |
Methods
DrawArrowButton(Graphics, Rectangle, ScrollButton, ButtonState)
Draws arrow button of scroll. If theme is disabled than draw classic scroll.
Declaration
public override void DrawArrowButton(Graphics g, Rectangle bounds, ScrollButton type, ButtonState state)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | |
| System.Drawing.Rectangle | bounds | |
| System.Windows.Forms.ScrollButton | type | |
| System.Windows.Forms.ButtonState | state |
Overrides
DrawArrows(Graphics, Rectangle, ScrollButton, Color)
Draws up arrow on the button.
Declaration
protected void DrawArrows(Graphics g, Rectangle bounds, ScrollButton type, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The graphics object to use. |
| System.Drawing.Rectangle | bounds | Bounds of the button. |
| System.Windows.Forms.ScrollButton | type | |
| System.Drawing.Color | color |
DrawBackground(Graphics, Rectangle, ButtonState)
Draws background of scroll. If theme is disabled than draw classic scroll.
Declaration
public override void DrawBackground(Graphics g, Rectangle bounds, ButtonState state)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | |
| System.Drawing.Rectangle | bounds | |
| System.Windows.Forms.ButtonState | state |
Overrides
DrawBackgroundLines(Graphics, Rectangle, Color)
Draws background lines.
Declaration
protected void DrawBackgroundLines(Graphics g, Rectangle bounds, Color lineColor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | Graphics object to use. |
| System.Drawing.Rectangle | bounds | Bounds of the background. |
| System.Drawing.Color | lineColor | Color of the lines. |
DrawMiddleLinesForThumb(Graphics, RectangleF, Color, Color)
Draws middle lines on the thumb.
Declaration
protected void DrawMiddleLinesForThumb(Graphics g, RectangleF bounds, Color firstColor, Color secondColor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | Graphics object to use. |
| System.Drawing.RectangleF | bounds | Bounds of the thumb. |
| System.Drawing.Color | firstColor | |
| System.Drawing.Color | secondColor |
DrawShadowForArrowButton(Graphics, RectangleF, Color, Color, Color)
Draws shadow for the arrow button.
Declaration
protected void DrawShadowForArrowButton(Graphics g, RectangleF bounds, Color shadowColor, Color startBackgroundColor, Color endBackgroundColor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The graphics object to use. |
| System.Drawing.RectangleF | bounds | Bounds of the arrow button. |
| System.Drawing.Color | shadowColor | |
| System.Drawing.Color | startBackgroundColor | |
| System.Drawing.Color | endBackgroundColor |
DrawShadowForThumb(Graphics, RectangleF, Color)
Draws shadow for the thumb.
Declaration
protected void DrawShadowForThumb(Graphics g, RectangleF bounds, Color shadowColor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | The graphics object to use. |
| System.Drawing.RectangleF | bounds | Bounds of the thumb. |
| System.Drawing.Color | shadowColor |
DrawThumb(Graphics, Rectangle, ButtonState)
Draws thumb for scroll. If theme is disabled than draw classic scroll.
Declaration
public override void DrawThumb(Graphics g, Rectangle bounds, ButtonState state)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | |
| System.Drawing.Rectangle | bounds | |
| System.Windows.Forms.ButtonState | state |
Overrides
GetHorizontalBrush(RectangleF, Color, Color)
Gets horizontal gradient brush.
Declaration
protected LinearGradientBrush GetHorizontalBrush(RectangleF rc, Color cl1, Color cl2)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.RectangleF | rc | |
| System.Drawing.Color | cl1 | |
| System.Drawing.Color | cl2 |
Returns
| Type |
|---|
| System.Drawing.Drawing2D.LinearGradientBrush |
GetRoundedPath(RectangleF, Int32)
Gets rounded path with specified radius for the rectangle.
Declaration
protected GraphicsPath GetRoundedPath(RectangleF bounds, int iRadius)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.RectangleF | bounds | |
| System.Int32 | iRadius |
Returns
| Type |
|---|
| System.Drawing.Drawing2D.GraphicsPath |
GetSlopingBrush(RectangleF, Color, Color)
Gets gradient brush with 53 angle.
Declaration
protected LinearGradientBrush GetSlopingBrush(RectangleF rc, Color cl1, Color cl2)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.RectangleF | rc | |
| System.Drawing.Color | cl1 | |
| System.Drawing.Color | cl2 |
Returns
| Type |
|---|
| System.Drawing.Drawing2D.LinearGradientBrush |
GetVerticalBrush(RectangleF, Color, Color)
Gets vertical gradient brush.
Declaration
protected LinearGradientBrush GetVerticalBrush(RectangleF rc, Color cl1, Color cl2)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.RectangleF | rc | |
| System.Drawing.Color | cl1 | |
| System.Drawing.Color | cl2 |
Returns
| Type |
|---|
| System.Drawing.Drawing2D.LinearGradientBrush |
InitializeRectangleEdges(RectangleF)
Initializes edges of specified rectangle.
Declaration
protected void InitializeRectangleEdges(RectangleF bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.RectangleF | bounds | Bounds of the rectangle. |
SetColorScheme()
Sets the color scheme for the button based on the current XP Scheme.
Declaration
public void SetColorScheme()
SetColorScheme(WindowsXPColorsScheme)
Sets WindowsXP color scheme for the control.
Declaration
public void SetColorScheme(WindowsXPColorsScheme colorScheme)
Parameters
| Type | Name | Description |
|---|---|---|
| WindowsXPColorsScheme | colorScheme |
ValidateRectangle(ref RectangleF)
Declaration
protected void ValidateRectangle(ref RectangleF rc)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.RectangleF | rc |