Class GdiControl
- Namespace
- PaintDotNet.Gdi
- Assembly
- PaintDotNet.Windows.Framework.dll
A control that does its painting in WM_PAINT via GDI calls, completely bypassing System.Drawing (GDI+)
and WinForm's built-in painting mechanisms. You will need to implement your own interop definitions to
paint using GDI. Use of the TerraFX.Interop.Windows nuget package is highly recommended.
The IGdiPaintContext passed to OnGdiPaint(IGdiPaintContext)
implements the IDeviceContext interface, which is accepted by some rendering
code in the System.Windows.Forms namespaces, such as ButtonRenderer,
TextRenderer, and VisualStyleRenderer.
This class primarily exists to serve as the base class for Direct2DControl.
public abstract class GdiControl : Control, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IIsDisposed, IDisposable
- Inheritance
-
GdiControl
- Implements
- Derived
- Inherited Members
Constructors
Properties
- DoubleBufferedGdiPaint
Gets or sets whether painting in OnGdiPaint(IGdiPaintContext) is double-buffered.
Double-buffering is implemented using the BeginBufferedPaint() and EndBufferedPaint() APIs.
NOTE: DoubleBuffered has no effect for this class.
The default value is false.
Methods
- CheckAccess()
Checks whether the calling thread has access to this control. This means that the calling thread is the same thread that created this control.
- VerifyAccess()
Enforces that the calling thread has access to this control. This means that the calling thread is the same thread that created this control.