Table of Contents

Method DrawPushButton

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

DrawPushButton(Graphics, AbstractControl, RectD, VisualControlState)

Draws a push button control within the specified bounds and visual state.

public static void DrawPushButton(this Graphics canvas, AbstractControl control, RectD rect, VisualControlState controlState)

Parameters

canvas Graphics

The Graphics surface used for rendering.

control AbstractControl

The AbstractControl instance where button will be painted. Used for scale factor and dark mode determination.

rect RectD

The bounding RectD that defines the button’s layout region.

controlState VisualControlState

The current VisualControlState used to render visual feedback (e.g., hover, pressed, disabled).

DrawPushButton(object?, PaintEventArgs, VisualControlState)

Draw push button using the specified parameters.

public static void DrawPushButton(object? sender, PaintEventArgs e, VisualControlState controlState)

Parameters

sender object

The container control where drawing is performed.

e PaintEventArgs

The paint arguments including canvas and bounding rectangle.

controlState VisualControlState

The state of the push button.