Sorry you only use 3 of those methods for the actual scrollbar and they are extremely easy to use. Here's our default code for them with windows classic theme:
public override void DrawScrollBarBackground(PaintEventArgs e, Rectangle bounds, ActiproSoftware.WinUICore.ScrollBar scrollBar) {
// Draw the background using a Windows Classic appearance
HatchedBackgroundFill.Draw(e.Graphics, bounds, SystemColors.ControlLightLight, SystemColors.ScrollBar);
}
public override void DrawScrollBarButton(PaintEventArgs e, Rectangle bounds, ScrollBarButton button) {
// Get the state
ButtonState state = ButtonState.Normal;
// Draw a border if enabled
UIElementDrawState drawState = button.GetDrawState();
if ((drawState & UIElementDrawState.Disabled) == UIElementDrawState.Disabled)
state = ButtonState.Inactive;
else if ((drawState & (UIElementDrawState.Hot | UIElementDrawState.Pressed)) == (UIElementDrawState.Hot | UIElementDrawState.Pressed))
state = ButtonState.Pushed;
// Draw the button
if (button.CommandLink.Command == button.ScrollBar.DecreaseSmallCommand) {
// Decrease button
ControlPaint.DrawScrollButton(e.Graphics, bounds,
(button.ScrollBar.Orientation == Orientation.Horizontal ? ScrollButton.Left : ScrollButton.Up), state);
}
else if (button.CommandLink.Command == button.ScrollBar.IncreaseSmallCommand) {
// Increase button
ControlPaint.DrawScrollButton(e.Graphics, bounds,
(button.ScrollBar.Orientation == Orientation.Horizontal ? ScrollButton.Right : ScrollButton.Down), state);
}
}
public override void DrawScrollBarThumb(PaintEventArgs e, Rectangle bounds, ScrollBarThumb thumb) {
// If the scrollbar is enabled...
if (thumb.ScrollBar.Enabled) {
// Draw the thumb/gripper using a Windows Classic appearance
e.Graphics.FillRectangle(SystemBrushes.Control, bounds);
e.Graphics.DrawLine(SystemPens.ControlLight, bounds.Left, bounds.Bottom - 2, bounds.Left, bounds.Top);
e.Graphics.DrawLine(SystemPens.ControlLight, bounds.Left, bounds.Top, bounds.Right - 2, bounds.Top);
e.Graphics.DrawLine(SystemPens.ControlDarkDark, bounds.Right - 1, bounds.Top, bounds.Right - 1, bounds.Bottom - 1);
e.Graphics.DrawLine(SystemPens.ControlDarkDark, bounds.Right - 1, bounds.Bottom - 1, bounds.Left, bounds.Bottom - 1);
e.Graphics.DrawLine(SystemPens.ControlLightLight, bounds.Left + 1, bounds.Bottom - 3, bounds.Left + 1, bounds.Top + 1);
e.Graphics.DrawLine(SystemPens.ControlLightLight, bounds.Left + 1, bounds.Top + 1, bounds.Right - 3, bounds.Top + 1);
e.Graphics.DrawLine(SystemPens.ControlDark, bounds.Right - 2, bounds.Top + 1, bounds.Right - 2, bounds.Bottom - 2);
e.Graphics.DrawLine(SystemPens.ControlDark, bounds.Right - 2, bounds.Bottom - 2, bounds.Left + 1, bounds.Bottom - 2);
}
}