WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GraphicsProvider

    Show / Hide Table of Contents

    Class GraphicsProvider

    Returns a graphics context when needed and raises a PrepareGraphics event to initialize the graphics object.

    Inheritance
    System.Object
    NonFinalizeDisposable
    Disposable
    GraphicsProvider
    Implements
    System.IDisposable
    IGraphicsProvider
    Inherited Members
    NonFinalizeDisposable.Dispose()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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 Description
    System.Drawing.Graphics

    Methods

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    NonFinalizeDisposable.Dispose(Boolean)

    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 Description
    GraphicsEventHandler

    Implements

    System.IDisposable
    IGraphicsProvider
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved