Window Element
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.
Syntax
<Window
ID
WindowType
[WindowState]
[Document]
[WindowLeft]
[WindowTop]
[WindowWidth]
[WindowHeight]
[Master]
[ContainerType]
[Container]
[Sheet]
[ReadOnly]
[ParentWindow]
[Page]
[ViewScale]
[ViewCenterX]
[ViewCenterY]>
</Window>
Attributes
ID
Required int. The unique ID of the element within its parent element.
WindowType
Required enumeration. 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.
WindowState
Optional int. An integer specifying bit flags. This attribute can be a sum of the following values.
Value |
Description |
---|---|
268435456 |
Restored. |
1073741824 |
Maximized. |
536870912 |
Minimized. |
1 |
Docked left. |
2 |
Docked top. |
4 |
Docked right. |
8 |
Docked bottom. |
16 |
Floating. |
32 |
Anchor left. |
64 |
Anchor top. |
128 |
Anchor right. |
256 |
Anchor bottom. |
1024 |
Anchor merged. |
67108864 |
Active. |
Document
Optional string. File path of the document displayed in this window. This attribute is relevant for windows whose WindowType is specified as Stencil.
WindowLeft
Optional int. Left coordinate of the window rectangle.
WindowTop
Optional int. Top coordinate of the window rectangle.
WindowWidth
Optional int. Width of the window rectangle.
WindowHeight
Optional int. Height of the window rectangle.
Master
Optional int. Master ID if this window is displaying a master.
ContainerType
Optional enumeration. May be one of the following values: Document, Page, or Master. Only relevant when WindowType is specified as Drawing or Sheet.
Container
Optional int. ID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified.
Sheet
Optional int. ID of sheet in container. Relevant only when Container is specified as Sheet.
ReadOnly
Optional boolean. Read-only flag if this stencil is not a document stencil.
ParentWindow
Optional int. ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil.
Page
Optional int. Page ID if this window is displaying a page. Relevant only when WindowType is specified as Drawing and ContainerType is specified as Page.
ViewScale
Optional float.
ViewCenterX
Optional float.
ViewCenterY
Optional float.
Element properties
Property |
Value |
---|---|
Name |
Window |
Minimum Occurrences |
0 |
Maximum Occurrences |
Unbounded |
Element information
Parent elements
Child elements
The Window element is only relevant for windows that relate to the drawing. This element is used to preserve exact window settings when roundtripping DatadiagramML files. If this element is not specified, Visio applies default window settings when opening a DatadiagramML file.
Example
The following example is from a document containing three window elements: the drawing page and two stencils.
The example has been excerpted for clarity.
See also
Window object