Method DrawBorderAndBackground
DrawBorderAndBackground(PaintEventArgs, DrawDefaultBackgroundFlags)
Draws the border and background for the control using the specified paint event arguments.
public virtual void DrawBorderAndBackground(PaintEventArgs e, AbstractControl.DrawDefaultBackgroundFlags flags = DrawDefaultBackgroundFlags.DrawBorderAndBackground)
Parameters
ePaintEventArgsThe paint event arguments containing the graphics context and client rectangle information used for drawing.
flagsAbstractControl.DrawDefaultBackgroundFlagsFlags that specify what to draw. Optional. If not specified, both border and background are painted.
Remarks
If the border margin is positive, the method draws the background and border separately, adjusting the client rectangle as needed. Otherwise, it draws only the background. This method is typically called during the control's paint cycle and can be overridden to customize border and background rendering.