VisioContainerEditingExtensions
OfficeIMO.Visio
Editing helpers for maintaining Visio-native container membership and bounds.
Inheritance
- object
- VisioContainerEditingExtensions
Methods
public static VisioShape AddNestedContainer(VisioPage page, VisioShape parent, VisioShape child, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #Adds a container as a cycle-safe nested member.
Parameters
- page OfficeIMO.Visio.VisioPage
- parent OfficeIMO.Visio.VisioShape
- child OfficeIMO.Visio.VisioShape
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic static VisioShape AddToContainer(VisioPage page, VisioShape container, VisioShape member, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #Adds one member shape to a Visio-native container and optionally resizes the container around all current members.
Parameters
- page OfficeIMO.Visio.VisioPage
- container OfficeIMO.Visio.VisioShape
- member OfficeIMO.Visio.VisioShape
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic static VisioShape AddToContainer(VisioPage page, VisioShape container, IEnumerable<VisioShape> members, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #Adds member shapes to a Visio-native container and optionally resizes the container around all current members.
Parameters
- page OfficeIMO.Visio.VisioPage
- container OfficeIMO.Visio.VisioShape
- members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape>
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic static VisioShapeSelection AddToContainer(VisioShapeSelection selection, VisioShape container, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #Adds all selected shapes to an existing Visio-native container.
Parameters
- selection OfficeIMO.Visio.VisioShapeSelection
- container OfficeIMO.Visio.VisioShape
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapeSelectionpublic static VisioShape ApplyContainerOptions(VisioPage page, VisioShape container, VisioContainerOptions options, bool refit = false) #Applies native container metadata and visual style to an existing Visio-native container.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape to update.
- options OfficeIMO.Visio.VisioContainerOptions
- Container metadata and style options.
- refit bool = false
- Whether the container should be refit around current members after metadata is applied.
Returns
VisioShapepublic static VisioShape ConfigureContainer(VisioPage page, VisioShape container, Action<VisioContainerOptions> configure, bool refit = false) #Updates native container metadata and visual style using a callback initialized from the current container state.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape to update.
- configure System.Action<OfficeIMO.Visio.VisioContainerOptions>
- Option callback.
- refit bool = false
- Whether the container should be refit around current members after metadata is applied.
Returns
VisioShapepublic static VisioContainerInfo GetContainerInfo(VisioPage page, VisioShape container) #Gets typed metadata and membership information for a Visio-native container.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape.
Returns
VisioContainerInfopublic static IReadOnlyList<VisioShape> GetContainerMembers(VisioPage page, VisioShape container) #Gets the shapes currently referenced by a Visio-native container.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape.
Returns
IReadOnlyList<VisioShape>public static VisioContainerOptions GetContainerOptions(VisioPage page, VisioShape container) #Gets editable options initialized from a Visio-native container's current metadata and visual style.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape.
Returns
VisioContainerOptionspublic static IReadOnlyList<VisioShape> GetNestedContainers(VisioPage page, VisioShape container) #Gets direct member containers.
Parameters
- page OfficeIMO.Visio.VisioPage
- container OfficeIMO.Visio.VisioShape
Returns
IReadOnlyList<VisioShape>public static IReadOnlyList<VisioShape> GetParentContainers(VisioPage page, VisioShape container) #Gets containers that directly contain the supplied container.
Parameters
- page OfficeIMO.Visio.VisioPage
- container OfficeIMO.Visio.VisioShape
Returns
IReadOnlyList<VisioShape>public static VisioShape RefitContainer(VisioPage page, VisioShape container, VisioContainerOptions? options = null) #Resizes a Visio-native container so it encloses its current typed members.
Parameters
- page OfficeIMO.Visio.VisioPage
- Page that owns the container.
- container OfficeIMO.Visio.VisioShape
- Container shape to resize.
- options OfficeIMO.Visio.VisioContainerOptions? = null
- Optional margin and heading settings used for the calculated bounds.
Returns
VisioShapepublic static VisioShape RemoveFromContainer(VisioPage page, VisioShape container, VisioShape member, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #Removes one member shape from a Visio-native container and optionally resizes the container around remaining members.
Parameters
- page OfficeIMO.Visio.VisioPage
- container OfficeIMO.Visio.VisioShape
- member OfficeIMO.Visio.VisioShape
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic static VisioShape RemoveFromContainer(VisioPage page, VisioShape container, IEnumerable<VisioShape> members, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #Removes member shapes from a Visio-native container and optionally resizes the container around remaining members.
Parameters
- page OfficeIMO.Visio.VisioPage
- container OfficeIMO.Visio.VisioShape
- members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape>
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapepublic static VisioShapeSelection RemoveFromContainer(VisioShapeSelection selection, VisioShape container, bool resizeToFit = true, VisioContainerOptions? resizeOptions = null) #Removes all selected shapes from an existing Visio-native container.
Parameters
- selection OfficeIMO.Visio.VisioShapeSelection
- container OfficeIMO.Visio.VisioShape
- resizeToFit bool = true
- resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShapeSelectionpublic static VisioShape WrapInContainer(VisioShapeSelection selection, string id, string text, VisioContainerOptions? options = null) #Creates a Visio-native container around the selected shapes.
Parameters
- selection OfficeIMO.Visio.VisioShapeSelection
- id string
- text string
- options OfficeIMO.Visio.VisioContainerOptions? = null
Returns
VisioShape