VisualDrawing Class
Represents a base type for all drawings that have a visual appearance in a specific position and of a specific size.
public abstract class VisualDrawing : Drawing
Public MustInherit Class VisualDrawing
Inherits Drawing
- Inheritance:
- System.ObjectVisualDrawing
- Derived
Properties
Action
Gets or sets the action settings for this drawing that specify what should happen when the user clicks on this drawing or hovers over this drawing with a pointing device such as a computer mouse.
To remove all actions from this drawing, set this property to null.
Property Value
The action settings for this drawing that specify what should happen when the user clicks on this drawing or hovers over this drawing with a pointing device such as a computer mouse.
Remarks
This property always returns a new instance of a ActionSettings that points to data associated with this drawing. This reduces memory footprint since simpler internal structures can be used to hold the data and execution time increase is negligible since Garbage Collector has a very good performance for a short-lived (Generation 0) objects.
When setting a value, instance of a ActionSettings won't actually be stored in this drawing, but the data to which the instance points to will be copied. This enables easy copying of complex properties from one drawing to another.
AlternativeText
Gets or sets the alternative, text-based representation of the information contained in this drawing.
To remove an alternative, text-based representation from this drawing, set this property to null.
public DrawingAlternativeText AlternativeText { get; set; }
Public Property AlternativeText As DrawingAlternativeText
Property Value
The alternative, text-based representation of the information contained in this drawing.
Remarks
This property always returns a new instance of a DrawingAlternativeText that points to data associated with this drawing. This reduces memory footprint since simpler internal structures can be used to hold the data and execution time increase is negligible since Garbage Collector has a very good performance for a short-lived (Generation 0) objects.
When setting a value, instance of a DrawingAlternativeText won't actually be stored in this drawing, but the data to which the instance points to will be copied. This enables easy copying of complex properties from one drawing to another.
CustomerData
Gets or sets the customer defined data.
public CustomerDataCollection CustomerData { get; }
Public ReadOnly Property CustomerData As CustomerDataCollection
Property Value
The customer defined data.
Hidden
Gets or sets a value indicating whether this drawing is hidden. Drawing is automatically hidden if any of its ancestor GroupShape is hidden.
Default value is false.
Property Value
- System.Boolean
true if drawing or any of its ancestor GroupShape is hidden; otherwise, false.
Layout
Gets or sets the location, size and transformations (flipping and rotation) of the bounding box enclosing this drawing.
Property Value
The location, size and transformations (flipping and rotation) of the bounding box enclosing this drawing.
Locks
Gets or sets the locking settings for this drawing. These settings inform the application about specific drawing properties that have been previously locked and thus should not be changed by the user when viewing a drawing in an application.
Default value is None.
Property Value
The locking settings for this drawing.
Remarks
Some values are applicable only to certain VisualDrawing derived types. Specified input values will be automatically coerced to a set of valid values for a specific VisualDrawing derived type as documented in DrawingLocks members documentation.
Name
Gets or sets the name of this drawing.
Property Value
- System.String
The name of this drawing.
Exceptions
- System.ArgumentException
Name cannot be null, System.String.Empty or consist only of white-space characters.
Placeholder
Gets the placeholder settings for this drawing if the drawing is a placeholder; otherwise, null.
public DrawingPlaceholder Placeholder { get; }
Public ReadOnly Property Placeholder As DrawingPlaceholder
Property Value
The placeholder settings for this drawing if the drawing is a placeholder; otherwise, null.
Remarks
This property always returns a new instance of a DrawingPlaceholder that points to data associated with this drawing. This reduces memory footprint since simpler internal structures can be used to hold the data and execution time increase is negligible since Garbage Collector has a very good performance for a short-lived (Generation 0) objects.
Methods
FormatDrawing()
Formats this VisualDrawing to its default size so it can be exported to PDF, XPS, image, or be printed.
public FormattedVisualDrawing FormatDrawing()
Public Function FormatDrawing As FormattedVisualDrawing
Returns
FormattedVisualDrawing that can be exported to PDF, XPS, image, or be printed.
Exceptions
- System.InvalidOperationException
Drawing cannot be formatted because it doesn't belong to any slide.
FormatDrawing(PaginatorOptions)
Formats this VisualDrawing to its default size so it can be exported to PDF, XPS, image, or be printed.
public FormattedVisualDrawing FormatDrawing(PaginatorOptions options)
Public Function FormatDrawing(options As PaginatorOptions) As FormattedVisualDrawing
Parameters
options
- PaginatorOptions
The options used to specify which parts of the visual drawing to update while formatting it.
Returns
FormattedVisualDrawing that can be exported to PDF, XPS, image, or be printed.
Exceptions
- System.InvalidOperationException
Drawing cannot be formatted because it doesn't belong to any slide.
FormatDrawing(Double, Double, LengthUnit)
Formats this VisualDrawing to specified size so it can be exported to PDF, XPS, image, or be printed.
public FormattedVisualDrawing FormatDrawing(double width, double height, LengthUnit unit)
Public Function FormatDrawing(width As Double, height As Double, unit As LengthUnit) As FormattedVisualDrawing
Parameters
width
- System.Double
The formatted drawing width.
height
- System.Double
The formatted drawing height.
unit
- LengthUnit
The formatted drawing width / height length unit.
Returns
FormattedVisualDrawing that can be exported to PDF, XPS, image, or be printed.
Exceptions
- System.InvalidOperationException
Drawing cannot be formatted because it doesn't belong to any slide.
FormatDrawing(Double, Double, LengthUnit, PaginatorOptions)
Formats this VisualDrawing to specified size so it can be exported to PDF, XPS, image, or be printed.
public FormattedVisualDrawing FormatDrawing(double width, double height, LengthUnit unit, PaginatorOptions options)
Public Function FormatDrawing(width As Double, height As Double, unit As LengthUnit, options As PaginatorOptions) As FormattedVisualDrawing
Parameters
width
- System.Double
The formatted drawing width.
height
- System.Double
The formatted drawing height.
unit
- LengthUnit
The formatted drawing width / height length unit.
options
- PaginatorOptions
The options used to specify which parts of the visual drawing to update while formatting it.
Returns
FormattedVisualDrawing that can be exported to PDF, XPS, image, or be printed.
Exceptions
- System.InvalidOperationException
Drawing cannot be formatted because it doesn't belong to any slide.
ToString()
Returns a System.String that represents this VisualDrawing instance.
Returns
- System.String
A System.String that represents this VisualDrawing instance.
Overrides
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).
Inherited Properties
DrawingType | Gets the type of the drawing. (Inherited from Drawing) |
Parent | Gets the parent group or null if drawing is not grouped. (Inherited from Drawing) |
Slide | Gets the slide associated with this drawing. (Inherited from Drawing) |
TextContent | Gets the text content of the current Drawing. (Inherited from Drawing) |
Inherited Methods
BringForward() | Brings this drawing forward so that it is hidden by fewer drawings that are in front of it. (Inherited from Drawing) |
BringForward(Drawing) | Brings this drawing forward so that is not hidden by the specified drawing and all other drawings behind the specified drawing. (Inherited from Drawing) |
BringToFront() | Brings this drawing in front of all other drawings so that no part of it is hidden behind another drawing. (Inherited from Drawing) |
SendBackward() | Sends this drawing backward so that it is hidden by more drawings that are in front of it. (Inherited from Drawing) |
SendBackward(Drawing) | Sends this drawing backward so that is hidden by the specified drawing and all other drawings in front of the specified drawing. (Inherited from Drawing) |
SendToBack() | Sends this drawing behind all other drawings. (Inherited from Drawing) |