Window

Window class

Represents an open window in a Microsoft Visio instance. This element contains information necessary to exactly re-create a user interface window in the application workspace when the DatadiagramML file is initially opened by Visio.

Constructors

NameDescription
WindowConstructor.

Properties

NameTypeDescription
StencilGroupStringSpecifies the group of merged stencil windows of which the window is a member. This attribute is relevant only for Windo
StencilGroupPosintContains an integer that specifies the relative position of a stencil within a group in a window.
ShowRulersintSpecifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant.
ShowGridintSpecifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant.
ShowPageBreaksintSpecifies whether page breaks are shown in a window. The value of the property is BOOL integer constant.
ShowGuidesintSpecifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant.
ShowConnectionPointsintSpecifies whether connection points are shown in a window. The value of the property is BOOL integer constant.
GlueSettingsintSpecifies the objects that shapes glue to when glue is enabled in the document. The value of the property is GlueSetting
SnapSettingsintSpecifies the objects that shapes snap to when snap is active in the window. The value may be a sum of the values in the
SnapExtensionsintSpecifies whether a specific snap extension setting is enabled or disabled for the active window. The value can be a sum
SnapAnglesFloatPointNumCollectionContains a collection of SnapAngle elements.
DynamicGridEnabledintSpecifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL intege
TabSplitterPosfloatSpecifies the width of the page tab control of a drawing window (as a fraction of the total width of the drawing window)
IDintThe unique ID of the element within its parent element.
WindowTypeintAn enumerated value that may be one of the following: Drawing, Sheet, Stencil, or Icon.A Window element of WindowType=‘S
WindowStateintThis attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant.
DocumentStringFile path of the document displayed in this window. This attribute is relevant for windows whose WindowType is specified
WindowLeftintLeft coordinate of the window rectangle.
WindowTopintTop coordinate of the window rectangle.
WindowWidthlongWidth of the window rectangle.
WindowHeightlongHeight of the window rectangle.
MasterMasterMaster ID if this window is displaying a master.
ContainerTypeintMay be one of the following values: Document, Page, or Master. Only relevant when WindowType is specified as Drawing or
ContainerintID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified.
SheetintID of sheet in container. Relevant only when Container is specified as Sheet.
ReadOnlyintRead-only flag if this stencil is not a document stencil. The value of the property is BOOL integer constant.
ParentWindowintID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil.
PagePagePage ID if this window is displaying a page. Relevant only when WindowType is specified as Drawing and ContainerType is
ViewScalefloatOptional double.
ViewCenterXfloatOptional double.
ViewCenterYfloatOptional double.

Window()

Constructor.

Window.StencilGroup property

Specifies the group of merged stencil windows of which the window is a member. This attribute is relevant only for Window elements whose WindowType attribute is Stencil, and only if the stencil window is part of a merged group of stencil windows. All stencil windows that are part of the same merged group have the same StencilGroup element value.

Type: String

Window.StencilGroupPos property

Contains an integer that specifies the relative position of a stencil within a group in a window.

Type: int

Window.ShowRulers property

Specifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant.

Type: int

Window.ShowGrid property

Specifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant.

Type: int

Window.ShowPageBreaks property

Specifies whether page breaks are shown in a window. The value of the property is BOOL integer constant.

Type: int

Window.ShowGuides property

Specifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant.

Type: int

Window.ShowConnectionPoints property

Specifies whether connection points are shown in a window. The value of the property is BOOL integer constant.

Type: int

Window.GlueSettings property

Specifies the objects that shapes glue to when glue is enabled in the document. The value of the property is GlueSettingsValue integer constant.

Type: int

Window.SnapSettings property

Specifies the objects that shapes snap to when snap is active in the window. The value may be a sum of the values in the following table. The value of the property is SnapSettingsValue integer constant.

Type: int

Window.SnapExtensions property

Specifies whether a specific snap extension setting is enabled or disabled for the active window. The value can be a sum of the values in the following table. The value of the property is SnapExtensionsValue integer constant.

Type: int

Window.SnapAngles property

Contains a collection of SnapAngle elements.

Type: FloatPointNumCollection

Window.DynamicGridEnabled property

Specifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL integer constant.

Type: int

Window.TabSplitterPos property

Specifies the width of the page tab control of a drawing window (as a fraction of the total width of the drawing window).

Type: float

Window.ID property

The unique ID of the element within its parent element.

Type: int

Window.WindowType property

An enumerated value that may be one of the following: Drawing, Sheet, Stencil, or Icon.A Window element of WindowType=‘Stencil’ must appear after its parent drawing window (WindowType=‘Drawing’) and before any other drawing window elements. The value of the property is WindowTypeValue integer constant.

Type: int

Window.WindowState property

This attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant.

Type: int

Window.Document property

File path of the document displayed in this window. This attribute is relevant for windows whose WindowType is specified as Stencil.

Type: String

Window.WindowLeft property

Left coordinate of the window rectangle.

Type: int

Window.WindowTop property

Top coordinate of the window rectangle.

Type: int

Window.WindowWidth property

Width of the window rectangle.

Type: long

Window.WindowHeight property

Height of the window rectangle.

Type: long

Window.Master property

Master ID if this window is displaying a master.

Type: Master

Window.ContainerType property

May be one of the following values: Document, Page, or Master. Only relevant when WindowType is specified as Drawing or Sheet. The value of the property is ContainerTypeValue integer constant.

Type: int

Window.Container property

ID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified.

Type: int

Window.Sheet property

ID of sheet in container. Relevant only when Container is specified as Sheet.

Type: int

Window.ReadOnly property

Read-only flag if this stencil is not a document stencil. The value of the property is BOOL integer constant.

Type: int

Window.ParentWindow property

ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil.

Type: int

Window.Page property

Page ID if this window is displaying a page. Relevant only when WindowType is specified as Drawing and ContainerType is specified as Page.

Type: Page

Window.ViewScale property

Optional double.

Type: float

Window.ViewCenterX property

Optional double.

Type: float

Window.ViewCenterY property

Optional double.

Type: float