Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

VisioContainerEditingExtensions

OfficeIMO.Visio

Namespace
OfficeIMO.Visio
Assembly
OfficeIMO.Visio
Source revision
e163ccb36643 with working tree changes
Modifiers
static

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 required
parent OfficeIMO.Visio.VisioShape required
child OfficeIMO.Visio.VisioShape required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
AddToContainer 3 overloads
public 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 required
container OfficeIMO.Visio.VisioShape required
member OfficeIMO.Visio.VisioShape required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public 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 required
container OfficeIMO.Visio.VisioShape required
members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape> required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public 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 required
container OfficeIMO.Visio.VisioShape required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional
public 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 required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape to update.
options OfficeIMO.Visio.VisioContainerOptions required
Container metadata and style options.
refit bool = false optional
Whether the container should be refit around current members after metadata is applied.

Returns

VisioShape
public 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 required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape to update.
configure System.Action<OfficeIMO.Visio.VisioContainerOptions> required
Option callback.
refit bool = false optional
Whether the container should be refit around current members after metadata is applied.

Returns

VisioShape
public static VisioContainerInfo GetContainerInfo(VisioPage page, VisioShape container) #

Gets typed metadata and membership information for a Visio-native container.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape.
public static IReadOnlyList<VisioShape> GetContainerMembers(VisioPage page, VisioShape container) #

Gets the shapes currently referenced by a Visio-native container.

Parameters

page OfficeIMO.Visio.VisioPage required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
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 required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape.
public static IReadOnlyList<VisioShape> GetNestedContainers(VisioPage page, VisioShape container) #

Gets direct member containers.

Parameters

page OfficeIMO.Visio.VisioPage required
container OfficeIMO.Visio.VisioShape required

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 required
container OfficeIMO.Visio.VisioShape required

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 required
Page that owns the container.
container OfficeIMO.Visio.VisioShape required
Container shape to resize.
options OfficeIMO.Visio.VisioContainerOptions? = null optional
Optional margin and heading settings used for the calculated bounds.

Returns

VisioShape
RemoveFromContainer 3 overloads
public 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 required
container OfficeIMO.Visio.VisioShape required
member OfficeIMO.Visio.VisioShape required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public 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 required
container OfficeIMO.Visio.VisioShape required
members System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape> required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape
public 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 required
container OfficeIMO.Visio.VisioShape required
resizeToFit bool = true optional
resizeOptions OfficeIMO.Visio.VisioContainerOptions? = null optional
public 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 required
id string required
text string required
options OfficeIMO.Visio.VisioContainerOptions? = null optional

Returns

VisioShape