GemBox.Presentation
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    Drawing Class

    Namespace:
    GemBox.Presentation
    Assembly:
    GemBox.Presentation.dll

    Represents a base type for all drawings.

    • C#
    • VB.NET
    public abstract class Drawing
    Public MustInherit Class Drawing
    Inheritance:
    System.Object
    Drawing
    Derived
    UnknownDrawing
    VisualDrawing

    Properties

    DrawingType

    Gets the type of the drawing.

    • C#
    • VB.NET
    public abstract DrawingType DrawingType { get; }
    Public MustOverride ReadOnly Property DrawingType As DrawingType
    Property Value
    DrawingType

    The type of the drawing.

    Parent

    Gets the parent group or null if drawing is not grouped.

    • C#
    • VB.NET
    public GroupShape Parent { get; }
    Public ReadOnly Property Parent As GroupShape
    Property Value
    GroupShape

    The parent group or null if drawing is not grouped.

    Slide

    Gets the slide associated with this drawing.

    • C#
    • VB.NET
    public SlideObject Slide { get; }
    Public ReadOnly Property Slide As SlideObject
    Property Value
    SlideObject

    The slide associated with this drawing.

    TextContent

    Gets the text content of the current Drawing.

    • C#
    • VB.NET
    public TextRange TextContent { get; }
    Public ReadOnly Property TextContent As TextRange
    Property Value
    TextRange

    The text content of the current Drawing.

    Remarks

    The property always returns a new instance of the TextRange class.

    For more information, see Find and Replace example.

    Methods

    BringForward()

    Brings this drawing forward so that it is hidden by fewer drawings that are in front of it.

    • C#
    • VB.NET
    public void BringForward()
    Public Sub BringForward
    Remarks

    This method works only if this drawing's Parent is not null and it moves this drawing by one place closer to the top-most drawing (last place) in the parent's Drawings collection.

    Exceptions
    System.InvalidOperationException

    Drawing is not contained in any group (Parent property is null).

    BringForward(Drawing)

    Brings this drawing forward so that is not hidden by the specified drawing and all other drawings behind the specified drawing.

    • C#
    • VB.NET
    public void BringForward(Drawing inFrontOfDrawing)
    Public Sub BringForward(inFrontOfDrawing As Drawing)
    Parameters
    inFrontOfDrawing
    Drawing

    The drawing in front of which should this drawing be placed.

    Remarks

    This method works only if this drawing's Parent is not null and it moves this drawing by one place before the inFrontOfDrawing in the parent's Drawings collection.

    Exceptions
    System.InvalidOperationException

    Drawing is not contained in any group (Parent property is null).

    System.ArgumentException

    inFrontOfDrawing is not in the same group as this drawing.

    BringToFront()

    Brings this drawing in front of all other drawings so that no part of it is hidden behind another drawing.

    • C#
    • VB.NET
    public void BringToFront()
    Public Sub BringToFront
    Remarks

    This method works only if this drawing's Parent is not null and it moves this drawing to the last place in the parent's Drawings collection, thus making it the top-most drawing.

    Exceptions
    System.InvalidOperationException

    Drawing is not contained in any group (Parent property is null).

    SendBackward()

    Sends this drawing backward so that it is hidden by more drawings that are in front of it.

    • C#
    • VB.NET
    public void SendBackward()
    Public Sub SendBackward
    Remarks

    This method works only if this drawing's Parent is not null and it moves this drawing by one place closer to the bottom-most drawing (first place) in the parent's Drawings collection.

    Exceptions
    System.InvalidOperationException

    Drawing is not contained in any group (Parent property is null).

    SendBackward(Drawing)

    Sends this drawing backward so that is hidden by the specified drawing and all other drawings in front of the specified drawing.

    • C#
    • VB.NET
    public void SendBackward(Drawing behindDrawing)
    Public Sub SendBackward(behindDrawing As Drawing)
    Parameters
    behindDrawing
    Drawing

    The drawing behind which should this drawing be placed.

    Remarks

    This method works only if this drawing's Parent is not null and it moves this drawing by one place after the behindDrawing in the parent's Drawings collection.

    Exceptions
    System.InvalidOperationException

    Drawing is not contained in any group (Parent property is null).

    System.ArgumentException

    behindDrawing is not in the same group as this drawing.

    SendToBack()

    Sends this drawing behind all other drawings.

    • C#
    • VB.NET
    public void SendToBack()
    Public Sub SendToBack
    Remarks

    This method works only if this drawing's Parent is not null and it moves this drawing to the first place in the parent's Drawings collection, thus making it the bottom-most drawing.

    Exceptions
    System.InvalidOperationException

    Drawing is not contained in any group (Parent property is null).

    ToString()

    Returns a System.String that represents this Drawing instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this Drawing instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Examples

    Find and Replace example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.