Class GraphicsProvider
Returns a graphics context when needed and raises a PrepareGraphics event to initialize the graphics object.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Drawing
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class GraphicsProvider : Disposable, IDisposable, IGraphicsProvider
Constructors
GraphicsProvider()
Initializes a new empty GraphicsProvider.
Declaration
public GraphicsProvider()
GraphicsProvider(Graphics)
Initializes a new GraphicsProvider with a Graphics object.
Declaration
public GraphicsProvider(Graphics g)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The Graphics object that will be used. |
Remarks
The PrepareGraphics event will not be fired when this type is instantiated via this constructor.
GraphicsProvider(Control)
Initializes a new GraphicsProvider with a System.Windows.Forms.Control object.
Declaration
public GraphicsProvider(Control control)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | control | The control that will be used for creating the graphics object. |
Properties
Graphics
Creates and returns a cached graphics object.
Declaration
public Graphics Graphics { get; }
Property Value
Type |
---|
System.Drawing.Graphics |
Methods
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
OnPrepareGraphics(GraphicsEventArgs)
Raises the PrepareGraphics event.
Declaration
protected virtual void OnPrepareGraphics(GraphicsEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
GraphicsEventArgs | e | A GraphicsEventArgs that contains the event data. |
Events
PrepareGraphics
Called after a new Graphics object was created and gives the handler a chance to initialize the graphics context.
Declaration
public event GraphicsEventHandler PrepareGraphics
Event Type
Type |
---|
GraphicsEventHandler |
Implements
System.IDisposable