VisioShape
OfficeIMO.Visio
Represents a shape on a Visio page.
Inheritance
- object
- VisioShape
Usage
Explore 302 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 156
- Method VisioStencilGalleryExtensions.AddStencilGallery
- Method VisioStencilPageExtensions.AddStencilShape
- Method VisioCalloutExtensions.AddCallout
- Property VisioConnector.From
- Property VisioConnector.To
- Method VisioContainerEditingExtensions.AddNestedContainer
- Method VisioContainerEditingExtensions.AddToContainer
- Method VisioContainerEditingExtensions.ApplyContainerOptions
- Method VisioContainerEditingExtensions.ConfigureContainer
- Method VisioContainerEditingExtensions.GetContainerMembers
- Method VisioContainerEditingExtensions.GetNestedContainers
- Method VisioContainerEditingExtensions.GetParentContainers
- Method VisioContainerEditingExtensions.RefitContainer
- Method VisioContainerEditingExtensions.RemoveFromContainer
- Method VisioContainerEditingExtensions.WrapInContainer
- Method VisioDataGraphicEditingExtensions.RefreshDataGraphics
- Method VisioDataGraphicExtensions.AddDataGraphics
- Property VisioDataGraphicInstance.Shapes
- Property VisioDataGraphicInstance.Target
- Property VisioDataGraphicLegend.Frame
- Property VisioDataGraphicLegend.Shapes
- Method VisioLayoutExtensions.ResizeToText
- Property VisioMaster.Shape
- Method VisioMasterEditingExtensions.ReplaceMaster
- Extension method VisioPage.AddCallout
- Extension method VisioPage.AddDataGraphics
- Extension method VisioPage.AddNestedContainer
- Extension method VisioPage.AddStencilGallery
- Extension method VisioPage.AddStencilShape
- Extension method VisioPage.AddToContainer
- Extension method VisioPage.AllShapes
- Extension method VisioPage.ApplyContainerOptions
- Extension method VisioPage.Callouts
- Extension method VisioPage.ConfigureContainer
- Extension method VisioPage.ConnectedComponent
- Extension method VisioPage.ConnectedShapes
- Extension method VisioPage.Containers
- Extension method VisioPage.FindShapeById
- Extension method VisioPage.GetContainerMembers
- Extension method VisioPage.GetNestedContainers
- Extension method VisioPage.GetParentContainers
- Extension method VisioPage.PathBetween
- Extension method VisioPage.RefitContainer
- Extension method VisioPage.RefreshDataGraphics
- Extension method VisioPage.RemoveFromContainer
- Extension method VisioPage.ReplaceMaster
- Extension method VisioPage.ResizeShape
- Extension method VisioPage.ShapesByMaster
- Extension method VisioPage.ShapesByName
- Extension method VisioPage.ShapesByNameU
- Extension method VisioPage.ShapesContainedIn
- Extension method VisioPage.ShapesContainingText
- Extension method VisioPage.ShapesInLayer
- Extension method VisioPage.ShapesIntersecting
- Extension method VisioPage.ShapesWithData
- Extension method VisioPage.ShapesWithHyperlink
- Extension method VisioPage.ShapesWithHyperlinks
- Extension method VisioPage.ShapesWithProtection
- Extension method VisioPage.ShapesWithShapeData
- Extension method VisioPage.ShapesWithUserCell
- Method VisioPage.AddCircle
- Method VisioPage.AddContainer
- Method VisioPage.AddData
- Method VisioPage.AddDecision
- Method VisioPage.AddDiamond
- Method VisioPage.AddEllipse
- Method VisioPage.AddHexagon
- Method VisioPage.AddManualOperation
- Method VisioPage.AddOffPageReference
- Method VisioPage.AddParallelogram
- Method VisioPage.AddPentagon
- Method VisioPage.AddPreparation
- Method VisioPage.AddProcess
- Method VisioPage.AddRectangle
- Method VisioPage.AddShape
- Method VisioPage.AddSquare
- Method VisioPage.AddTextBox
- Method VisioPage.AddTitle
- Method VisioPage.AddTrapezoid
- Method VisioPage.AddTriangle
- Method VisioPage.GetShape
- Method VisioPage.UngroupShape
- Property VisioPage.Shapes
- Method VisioPageQueryExtensions.AllShapes
- Method VisioPageQueryExtensions.Callouts
- Method VisioPageQueryExtensions.ConnectedComponent
- Method VisioPageQueryExtensions.ConnectedShapes
- Method VisioPageQueryExtensions.Containers
- Method VisioPageQueryExtensions.FindShapeById
- Method VisioPageQueryExtensions.PathBetween
- Method VisioPageQueryExtensions.ShapesByMaster
- Method VisioPageQueryExtensions.ShapesByName
- Method VisioPageQueryExtensions.ShapesByNameU
- Method VisioPageQueryExtensions.ShapesContainedIn
- Method VisioPageQueryExtensions.ShapesContainingText
- Method VisioPageQueryExtensions.ShapesInLayer
- Method VisioPageQueryExtensions.ShapesIntersecting
- Method VisioPageQueryExtensions.ShapesWithData
- Method VisioPageQueryExtensions.ShapesWithHyperlink
- Method VisioPageQueryExtensions.ShapesWithHyperlinks
- Method VisioPageQueryExtensions.ShapesWithProtection
- Method VisioPageQueryExtensions.ShapesWithShapeData
- Method VisioPageQueryExtensions.ShapesWithUserCell
- Extension method VisioShape.ApplyStyle
- Extension method VisioShape.ApplyTextStyle
- Extension method VisioShape.MarkAsBackgroundSurface
- Extension method VisioShape.MarkAsGeneratedDiagramAdornment
- Extension method VisioShape.ResizeToText
- Extension method VisioShape.SetShapeSheetSection
- Method VisioShape.ClearLayoutPolicy
- Method VisioShape.ClearProtection
- Method VisioShape.FindDescendantById
- Method VisioShape.LockPosition
- Method VisioShape.LockSize
- Method VisioShape.Protect
- Method VisioShape.SetBaseline
- Method VisioShape.SetBold
- Method VisioShape.SetCapitalization
- Method VisioShape.SetConnectorPermeability
- Method VisioShape.SetFill
- Method VisioShape.SetFont
- Method VisioShape.SetFontSize
- Method VisioShape.SetItalic
- Method VisioShape.SetLayer
- Method VisioShape.SetPlacementFlip
- Method VisioShape.SetPlacementOnTop
- Method VisioShape.SetPlacementStyle
- Method VisioShape.SetPlow
- Method VisioShape.SetShapeSplitting
- Method VisioShape.SetSmallCaps
- Method VisioShape.SetStrikethrough
- Method VisioShape.SetStroke
- Method VisioShape.SetText
- Method VisioShape.SetTextAlignment
- Method VisioShape.SetTextColor
- Method VisioShape.SetUnderline
- Method VisioShape.TransformTextCase
- Property VisioShape.Children
- Property VisioShape.MasterShape
- Property VisioShape.Parent
- Method VisioShapeDataSchema.ApplyTo
- Property VisioShapeDuplicationOptions.ShapeIdFactory
- Method VisioShapeResizeExtensions.ResizeShape
- Extension method VisioShapeSelection.AddDataGraphics
- Extension method VisioShapeSelection.WrapInContainer
- Method VisioShapeSelection.GetEnumerator
- Property VisioShapeSelection.Item
- Method VisioShapeSemanticExtensions.MarkAsBackgroundSurface
- Method VisioShapeSemanticExtensions.MarkAsGeneratedDiagramAdornment
- Method VisioShapeSheetExtensions.SetShapeSheetSection
- Method VisioStyleExtensions.ApplyStyle
- Method VisioStyleExtensions.ApplyTextStyle
- Property VisioSwimlaneActivityPlacement.Shape
- Property VisioSwimlaneLane.Body
- Property VisioSwimlaneLane.Header
- Property VisioSwimlanePhase.Header
Accepted by parameters 146
- Method VisioCalloutExtensions.AddCallout
- Method VisioCommentExtensions.AddComment
- Method VisioCommentExtensions.CommentsForShape
- Constructor VisioConnector.VisioConnector
- Constructor VisioConnector.VisioConnector
- Extension method VisioConnector.RouteOrthogonalAroundShapes
- Method VisioConnectorRoutingExtensions.RouteOrthogonalAroundShapes
- Extension method VisioConnectorSelection.RouteOrthogonalAroundShapes
- Method VisioContainerEditingExtensions.AddNestedContainer
- Method VisioContainerEditingExtensions.AddNestedContainer
- Method VisioContainerEditingExtensions.AddToContainer
- Method VisioContainerEditingExtensions.AddToContainer
- Method VisioContainerEditingExtensions.AddToContainer
- Method VisioContainerEditingExtensions.ApplyContainerOptions
- Method VisioContainerEditingExtensions.ConfigureContainer
- Method VisioContainerEditingExtensions.GetContainerInfo
- Method VisioContainerEditingExtensions.GetContainerMembers
- Method VisioContainerEditingExtensions.GetContainerOptions
- Method VisioContainerEditingExtensions.GetNestedContainers
- Method VisioContainerEditingExtensions.GetParentContainers
- Method VisioContainerEditingExtensions.RefitContainer
- Method VisioContainerEditingExtensions.RemoveFromContainer
- Method VisioContainerEditingExtensions.RemoveFromContainer
- Method VisioContainerEditingExtensions.RemoveFromContainer
- Method VisioDataGraphicEditingExtensions.GetDataGraphic
- Method VisioDataGraphicEditingExtensions.RefreshDataGraphics
- Method VisioDataGraphicEditingExtensions.RemoveDataGraphics
- Method VisioDataGraphicExtensions.AddDataGraphics
- Method VisioDocument.RegisterMaster
- Method VisioDuplicationExtensions.DuplicateShapes
- Method VisioLayoutExtensions.GetPageShapeBounds
- Method VisioLayoutExtensions.GetShapeBounds
- Method VisioLayoutExtensions.GetShapeBounds
- Method VisioLayoutExtensions.ResizeToText
- Constructor VisioMaster.VisioMaster
- Method VisioMasterEditingExtensions.ReplaceMaster
- Extension method VisioPage.AddCallout
- Extension method VisioPage.AddComment
- Extension method VisioPage.AddDataGraphics
- Extension method VisioPage.AddNestedContainer
- Extension method VisioPage.AddNestedContainer
- Extension method VisioPage.AddToContainer
- Extension method VisioPage.AddToContainer
- Extension method VisioPage.AddToContainer
- Extension method VisioPage.ApplyContainerOptions
- Extension method VisioPage.CommentsForShape
- Extension method VisioPage.ConfigureContainer
- Extension method VisioPage.ConnectedComponent
- Extension method VisioPage.ConnectedConnectors
- Extension method VisioPage.ConnectedShapes
- Extension method VisioPage.DuplicateShapes
- Extension method VisioPage.GetContainerInfo
- Extension method VisioPage.GetContainerMembers
- Extension method VisioPage.GetContainerOptions
- Extension method VisioPage.GetDataGraphic
- Extension method VisioPage.GetNestedContainers
- Extension method VisioPage.GetParentContainers
- Extension method VisioPage.IncomingConnectors
- Extension method VisioPage.OutgoingConnectors
- Extension method VisioPage.PathBetween
- Extension method VisioPage.PathBetween
- Extension method VisioPage.RefitContainer
- Extension method VisioPage.RefreshDataGraphics
- Extension method VisioPage.RemoveDataGraphics
- Extension method VisioPage.RemoveFromContainer
- Extension method VisioPage.RemoveFromContainer
- Extension method VisioPage.RemoveFromContainer
- Extension method VisioPage.ReplaceMaster
- Extension method VisioPage.ResizeShape
- Extension method VisioPage.SelectConnectedComponent
- Extension method VisioPage.SelectConnectedConnectors
- Extension method VisioPage.SelectContainedIn
- Extension method VisioPage.SelectIncomingConnectors
- Extension method VisioPage.SelectIntersecting
- Extension method VisioPage.SelectOutgoingConnectors
- Extension method VisioPage.SelectPathBetween
- Extension method VisioPage.SelectPathBetween
- Extension method VisioPage.SelectShapes
- Extension method VisioPage.ShapesContainedIn
- Extension method VisioPage.ShapesIntersecting
- Method VisioPage.AddConnector
- Method VisioPage.AddConnector
- Method VisioPage.AddContainer
- Method VisioPage.AddTextBox
- Method VisioPage.AddTitle
- Method VisioPage.AddToLayer
- Method VisioPage.ConfigureShapes
- Method VisioPage.GetShape
- Method VisioPage.ReconnectConnector
- Method VisioPage.ReconnectConnector
- Method VisioPage.ReconnectConnectorEnd
- Method VisioPage.ReconnectConnectorStart
- Method VisioPage.ReparentShape
- Method VisioPage.ReparentShape
- Method VisioPage.ReplaceMasters
- Method VisioPage.RetargetConnectors
- Method VisioPage.RetargetConnectors
- Method VisioPage.UngroupShape
- Method VisioPageQueryExtensions.ConnectedComponent
- Method VisioPageQueryExtensions.ConnectedConnectors
- Method VisioPageQueryExtensions.ConnectedShapes
- Method VisioPageQueryExtensions.IncomingConnectors
- Method VisioPageQueryExtensions.OutgoingConnectors
- Method VisioPageQueryExtensions.PathBetween
- Method VisioPageQueryExtensions.PathBetween
- Method VisioPageQueryExtensions.SelectConnectedComponent
- Method VisioPageQueryExtensions.SelectConnectedConnectors
- Method VisioPageQueryExtensions.SelectContainedIn
- Method VisioPageQueryExtensions.SelectIncomingConnectors
- Method VisioPageQueryExtensions.SelectIntersecting
- Method VisioPageQueryExtensions.SelectOutgoingConnectors
- Method VisioPageQueryExtensions.SelectPathBetween
- Method VisioPageQueryExtensions.SelectPathBetween
- Method VisioPageQueryExtensions.SelectShapes
- Method VisioPageQueryExtensions.ShapesContainedIn
- Method VisioPageQueryExtensions.ShapesIntersecting
- Extension method VisioShape.ApplyStyle
- Extension method VisioShape.ApplyTextStyle
- Extension method VisioShape.GetPageShapeBounds
- Extension method VisioShape.GetShapeBounds
- Extension method VisioShape.GetShapeSheetSections
- Extension method VisioShape.MarkAsBackgroundSurface
- Extension method VisioShape.MarkAsGeneratedDiagramAdornment
- Extension method VisioShape.RemoveShapeSheetSection
- Extension method VisioShape.ResizeToText
- Extension method VisioShape.SetShapeSheetSection
- Method VisioShapeDataSchema.ApplyTo
- Method VisioShapeDataSchema.ApplyTo
- Method VisioShapeDataSchema.Validate
- Method VisioShapeResizeExtensions.ResizeShape
- Constructor VisioShapeSelection.VisioShapeSelection
- Extension method VisioShapeSelection.AddToContainer
- Extension method VisioShapeSelection.RemoveFromContainer
- Method VisioShapeSelection.Text
- Method VisioShapeSemanticExtensions.MarkAsBackgroundSurface
- Method VisioShapeSemanticExtensions.MarkAsGeneratedDiagramAdornment
- Method VisioShapeSheetExtensions.GetShapeSheetSections
- Method VisioShapeSheetExtensions.RemoveShapeSheetSection
- Method VisioShapeSheetExtensions.SetShapeSheetSection
- Method VisioShapeStyle.ApplyTo
- Extension method VisioStencilMigrationMapBuilder.Map
- Method VisioStencilMigrationMapBuilder.Map
- Method VisioStencilMigrationMapBuilderExtensions.Map
- Method VisioStencilMigrationRule.ForPredicate
- Method VisioStyleExtensions.ApplyStyle
- Method VisioStyleExtensions.ApplyTextStyle
Constructors
public VisioShape(string id) #Initializes a new instance of the VisioShape class with the specified identifier.
Parameters
- id string
- Identifier of the shape.
public VisioShape(string id, OfficeLength pinX, OfficeLength pinY, OfficeLength width, OfficeLength height, string text) #Creates geometry from explicit physical lengths.
Parameters
- id string
- pinX OfficeIMO.OfficeLength
- pinY OfficeIMO.OfficeLength
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- text string
Methods
public VisioHyperlink AddHyperlink(string address, string? description = null, string? subAddress = null) #Adds a hyperlink to this shape.
Parameters
- address string
- External hyperlink address.
- description string? = null
- Optional display description.
- subAddress string? = null
- Optional internal sub-address.
public VisioHyperlink AddHyperlink(Uri address, string? description = null, string? subAddress = null) #Adds a hyperlink to this shape.
Parameters
- address System.Uri
- External hyperlink address.
- description string? = null
- Optional display description.
- subAddress string? = null
- Optional internal sub-address.
public VisioHyperlink AddPageHyperlink(string pageName, string? description = null) #Adds an internal hyperlink to another page in the same Visio document.
Parameters
- pageName string
- Target page name.
- description string? = null
- Optional display description.
public VisioShape ClearLayoutPolicy() #Clears explicit Shape Layout override cells from this shape.
Returns
VisioShapepublic VisioShape ClearProtection() #Clears explicit ShapeSheet protection cells from this shape.
Returns
VisioShapepublic VisioShape? FindDescendantById(string id) #Recursively searches the shape hierarchy for a shape with the provided identifier.
Parameters
- id string
- Identifier to locate.
public VisioShapeDataRow? FindShapeData(string name) #Finds a Shape Data row by row name.
Parameters
- name string
- Shape Data row name.
Returns
VisioShapeDataRow?public VisioUserCell? FindUserCell(string name) #Finds a user-defined ShapeSheet cell by row name.
Parameters
- name string
- User cell row name.
Returns
VisioUserCell?public ValueTuple<double, double> GetAbsolutePoint(double x, double y) #Transforms a point from the shape's local coordinate system to the page coordinate system.
Parameters
- x double
- X coordinate of the point relative to the shape's local coordinate system.
- y double
- Y coordinate of the point relative to the shape's local coordinate system.
Returns
ValueTuple<double, double> The point's absolute coordinates on the page, including cached reflections and every containing group.Exceptions
InvalidDataException– A native reflection has neither a finite cache nor a constant numeric formula.
public ValueTuple<OfficeLength, OfficeLength, OfficeLength, OfficeLength> GetBounds() #Gets the physical bounds in page coordinates, including rotation and parent transforms.
Returns
ValueTuple<OfficeLength, OfficeLength, OfficeLength, OfficeLength>public string? GetShapeDataValue(string name) #Gets a Shape Data value by row name.
Parameters
- name string
- Shape Data row name.
Returns
string?public string? GetUserCellValue(string name) #Gets a user-defined ShapeSheet cell value by row name.
Parameters
- name string
- User cell row name.
Returns
string?public VisioShape LockPosition(bool locked = true) #Locks or unlocks this shape's position.
Parameters
- locked bool = true
Returns
VisioShapepublic VisioShape LockSize(bool locked = true) #Locks or unlocks this shape's size.
Parameters
- locked bool = true
Returns
VisioShapepublic VisioShape Protect(Action<VisioShapeProtection> configure) #Configures ShapeSheet protection cells for this shape.
Parameters
- configure System.Action<OfficeIMO.Visio.VisioShapeProtection>
- Protection configuration delegate.
Returns
VisioShapepublic VisioShape SetBaseline(OfficeTextBaseline baseline) #Sets the native baseline placement for the whole-shape text.
Parameters
- baseline OfficeIMO.Drawing.OfficeTextBaseline
Returns
VisioShapepublic VisioShape SetBold(bool enabled = true) #Sets whether the whole-shape text is bold.
Parameters
- enabled bool = true
Returns
VisioShapepublic VisioShape SetCapitalization(VisioTextCapitalization capitalization) #Sets Visio's native display-time capitalization for the whole-shape text.
Parameters
- capitalization OfficeIMO.Visio.VisioTextCapitalization
Returns
VisioShapepublic VisioShape SetConnectorPermeability(bool horizontal = true, bool vertical = true) #Allows or disallows connector routing through this shape.
Parameters
- horizontal bool = true
- vertical bool = true
Returns
VisioShapepublic VisioShape SetFill(OfficeColor color, int pattern = 1) #Sets fill color and optional pattern.
Parameters
- color OfficeIMO.OfficeColor
- Fill color.
- pattern int = 1
- Fill pattern index (default 1=Solid).
Returns
VisioShapepublic VisioShape SetFont(string fontFamily) #Sets the whole-shape text font family.
Parameters
- fontFamily string
Returns
VisioShapepublic VisioShape SetFontSize(double size) #Sets the whole-shape text size in points.
Parameters
- size double
Returns
VisioShapepublic VisioShape SetItalic(bool enabled = true) #Sets whether the whole-shape text is italic.
Parameters
- enabled bool = true
Returns
VisioShapepublic VisioShape SetLayer(string layerName) #Adds the shape to a page layer.
Parameters
- layerName string
- Layer name.
Returns
VisioShapepublic VisioShape SetPlacementFlip(VisioPlacementFlip flip) #Sets the shape-level Visio placement flip behavior.
Parameters
- flip OfficeIMO.Visio.VisioPlacementFlip
Returns
VisioShapepublic VisioShape SetPlacementOnTop(bool allowed = true) #Allows or disallows placing other shapes on top of this shape during layout.
Parameters
- allowed bool = true
Returns
VisioShapepublic VisioShape SetPlacementStyle(VisioPlacementStyle style) #Sets the shape-level Visio placement style.
Parameters
- style OfficeIMO.Visio.VisioPlacementStyle
Returns
VisioShapepublic VisioShape SetPlow(VisioShapePlowCode code) #Sets the shape-level Visio plow behavior.
Parameters
- code OfficeIMO.Visio.VisioShapePlowCode
Returns
VisioShapepublic VisioShapeDataRow SetShapeData(string name, string? value, string? label = null, VisioShapeDataType? type = null, string? prompt = null, string? format = null) #Sets or creates a Shape Data row.
Parameters
- name string
- Shape Data row name.
- value string?
- Shape Data value.
- label string? = null
- Optional label shown in Visio's Shape Data window.
- type OfficeIMO.Visio.VisioShapeDataType? = null
- Optional Shape Data type.
- prompt string? = null
- Optional help prompt.
- format string? = null
- Optional format picture or list values.
Returns
VisioShapeDataRowpublic VisioShape SetShapeSplitting(bool canSplit = true, bool canBeSplit = true) #Allows or disallows this shape splitting other shapes.
Parameters
- canSplit bool = true
- canBeSplit bool = true
Returns
VisioShapepublic VisioShape SetSmallCaps(bool enabled = true) #Enables or disables Visio's native small-capital style.
Parameters
- enabled bool = true
Returns
VisioShapepublic VisioShape SetStrikethrough(OfficeTextDecorationStyle style = Single) #Sets the native strikethrough variant for the whole-shape text.
Parameters
- style OfficeIMO.Drawing.OfficeTextDecorationStyle = Single
Returns
VisioShapepublic VisioShape SetStroke(OfficeColor color, double weight = 0.0138889, int pattern = 1) #Sets stroke color, weight (inches), and optional pattern.
Parameters
- color OfficeIMO.OfficeColor
- Line color.
- weight double = 0.0138889
- Line weight in inches.
- pattern int = 1
- Line pattern index (default 1=Solid).
Returns
VisioShapepublic VisioShape SetText(string text) #Sets shape text.
Parameters
- text string
- Text content.
Returns
VisioShapepublic VisioShape SetTextAlignment(OfficeAlignment horizontal, VisioTextVerticalAlignment? vertical = null) #Sets whole-shape text alignment.
Parameters
- horizontal OfficeIMO.OfficeAlignment
- vertical OfficeIMO.Visio.VisioTextVerticalAlignment? = null
Returns
VisioShapepublic VisioShape SetTextColor(OfficeColor color) #Sets the whole-shape text color.
Parameters
- color OfficeIMO.OfficeColor
Returns
VisioShapepublic VisioShape SetUnderline(OfficeTextDecorationStyle style = Single) #Sets the native underline variant for the whole-shape text.
Parameters
- style OfficeIMO.Drawing.OfficeTextDecorationStyle = Single
Returns
VisioShapepublic VisioUserCell SetUserCell(string name, string? value, string? unit = null, string? formula = null, string? prompt = null) #Sets or creates a user-defined ShapeSheet cell.
Parameters
- name string
- User cell row name.
- value string?
- Value cell contents.
- unit string? = null
- Optional unit.
- formula string? = null
- Optional ShapeSheet formula.
- prompt string? = null
- Optional prompt.
Returns
VisioUserCellpublic VisioShape TransformTextCase(OfficeTextCase textCase, CultureInfo? culture = null) #Transforms the stored shape text while preserving all shape and text formatting.
Parameters
- textCase OfficeIMO.Drawing.OfficeTextCase
- culture System.Globalization.CultureInfo? = null
Returns
VisioShapeInherited Methods
Properties
public string? Type { get; internal set; } #Gets or sets the Visio type of the shape (for example "Group").
public VisioMaster? Master { get; set; } #Gets or sets the master associated with the shape.
public string? MasterShapeId { get; internal set; } #Gets the identifier of the referenced master shape when VisioShape.Master is defined.
public VisioShape? MasterShape { get; internal set; } #Gets the master shape instance referenced by VisioShape.MasterShapeId, if any.
public double Angle { get; set; } #Gets or sets the rotation angle of the shape in radians.
public VisioTextStyle? TextStyle { get; set; } #Gets or sets whole-shape text formatting.
public int LinePattern { get; set; } #Line pattern (0=None, 1=Solid, 2=Dashed, etc.).
public VisioShape? Parent { get; internal set; } #Parent shape when part of a group hierarchy.
public IList<VisioShape> Children { get; } #Child shapes when this shape represents a group.
public IList<VisioConnectionPoint> ConnectionPoints { get; } #Connection points associated with the shape.
public IList<VisioHyperlink> Hyperlinks { get; } #Hyperlinks attached to this shape.
public IList<VisioUserCell> UserCells { get; } #User-defined ShapeSheet cells attached to this shape.
public IList<VisioShapeDataRow> ShapeData { get; } #Visio Shape Data rows attached to this shape.
public VisioShapeProtection Protection { get; } #Visio ShapeSheet protection cells controlling interactive editing in Visio.
public VisioPlacementStyle? PlacementStyle { get; set; } #Gets or sets the shape-level placement style Visio uses during page layout.
public VisioPlacementFlip? PlacementFlip { get; set; } #Gets or sets how Visio may flip or rotate this shape during page layout.
public VisioShapePlowCode? PlowCode { get; set; } #Gets or sets whether this shape moves away when another placeable shape is dropped nearby.
public bool? AllowPlacementOnTop { get; set; } #Gets or sets whether other placeable shapes may be placed on top of this shape during layout.
public bool? AllowHorizontalConnectorRoutingThrough { get; set; } #Gets or sets whether connectors may route horizontally through this shape.
public bool? AllowVerticalConnectorRoutingThrough { get; set; } #Gets or sets whether connectors may route vertically through this shape.
public bool? CanSplitShapes { get; set; } #Gets or sets whether this shape may split other splittable shapes.
public bool? CanBeSplit { get; set; } #Gets or sets whether this shape can be split by another shape.
public IList<string> ContainerMemberIds { get; } #Shape identifiers this shape contains when it is used as a container.
public IList<string> ContainerOwnerIds { get; } #Container shape identifiers this shape belongs to.
public bool IsContainer { get; } #Gets whether this shape is marked as a Visio container.
public bool IsCallout { get; } #Gets whether this shape is marked as an OfficeIMO callout or annotation.
public bool IsBackgroundSurface { get; } #Gets whether this shape is marked as a background surface such as a region, zone, lane, or band.
public bool IsDiagramAdornment { get; } #Gets whether this shape is marked as a generated diagram adornment such as a title, legend item, or zone caption.
public string? CalloutTargetId { get; } #Gets the target shape identifier for an OfficeIMO callout, if available.
public Dictionary<string, string> Data { get; } #Arbitrary data associated with the shape.
public OfficeLength LocPinX { get; set; } #Gets or sets the physical LocPinX.
public OfficeLength LocPinY { get; set; } #Gets or sets the physical LocPinY.
Extension Methods
public static VisioShape ApplyStyle(VisioShape shape, VisioShapeStyle style) #Applies a reusable style to a shape.
Parameters
- shape OfficeIMO.Visio.VisioShape
- style OfficeIMO.Visio.VisioShapeStyle
Returns
VisioShapepublic static VisioShape ApplyTextStyle(VisioShape shape, VisioTextStyle style) #Applies a reusable text style to a shape.
Parameters
- shape OfficeIMO.Visio.VisioShape
- style OfficeIMO.Visio.VisioTextStyle
Returns
VisioShapepublic static VisioShapeBounds GetPageShapeBounds(VisioShape shape) #Gets rotation-aware bounds in page coordinates, including every parent-group transform for a nested shape.
Parameters
- shape OfficeIMO.Visio.VisioShape
Returns
VisioShapeBoundspublic static VisioShapeBounds GetShapeBounds(VisioShape shape) #Gets the page-space bounds for a shape.
Parameters
- shape OfficeIMO.Visio.VisioShape
- Shape to inspect.
Returns
VisioShapeBoundspublic static IReadOnlyList<VisioShapeSheetSection> GetShapeSheetSections(VisioShape shape) #Returns source-preserved ShapeSheet sections, including native text rows with current typed edits.
Parameters
- shape OfficeIMO.Visio.VisioShape
Returns
IReadOnlyList<VisioShapeSheetSection>public static VisioShape MarkAsBackgroundSurface(VisioShape shape) #Marks a shape as a background surface such as a zone, subnet, lane, band, or grouping region.
Parameters
- shape OfficeIMO.Visio.VisioShape
- Shape to mark.
Returns
VisioShapepublic static VisioShape MarkAsGeneratedDiagramAdornment(VisioShape shape) #Marks a generated label, title, legend item, or caption as a diagram adornment that quality checks and routing can treat as non-domain content.
Parameters
- shape OfficeIMO.Visio.VisioShape
- Shape to mark.
Returns
VisioShapepublic static bool RemoveShapeSheetSection(VisioShape shape, string name) #Removes a source-preserved section and clears any typed formatting owned by that text section.
Parameters
- shape OfficeIMO.Visio.VisioShape
- name string
Returns
boolpublic static VisioShape ResizeToText(VisioShape shape, OfficeFontInfo? fontInfo = null, double horizontalPadding = 0.25, double verticalPadding = 0.14, double minimumWidth = 0.5, double minimumHeight = 0.3) #Resizes a shape to fit its plain text using deterministic OfficeIMO.Drawing measurement.
Parameters
- shape OfficeIMO.Visio.VisioShape
- Shape to resize.
- fontInfo OfficeIMO.Drawing.OfficeFontInfo? = null
- Font descriptor used for measurement. Uses Office default when omitted.
- horizontalPadding double = 0.25
- Horizontal padding in inches.
- verticalPadding double = 0.14
- Vertical padding in inches.
- minimumWidth double = 0.5
- Minimum resulting width in inches.
- minimumHeight double = 0.3
- Minimum resulting height in inches.
Returns
VisioShapepublic static VisioShape SetShapeSheetSection(VisioShape shape, VisioShapeSheetSection section) #Sets a typed ShapeSheet section without disturbing other preserved sections.
Parameters
- shape OfficeIMO.Visio.VisioShape
- section OfficeIMO.Visio.VisioShapeSheetSection
Returns
VisioShape