Export (0) Print
Expand All
Expand Minimize

<Window> element

<Window> element

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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 XML for Visio file is initially opened by Visio.

Syntax

<Window
    ID = "unitval"
    WindowType= "windowtype"
    [WindowState = "intval"] 
    [Document = "documentfilepath"] 
    [WindowLeft = "intval"] 
    [WindowTop = "intval"] 
    [WindowWidth = "intval"] 
    [WindowHeight = "intval"] 
    [Master = "intval"] 
    [ContainerType = "enumval"] 
    [Container = "intval"] 
    [Sheet = "intval"] 
    [ReadOnly = "boolval"] 
    [ParentWindow = "intval"] 
    [Page = "intval"] 
    [ViewScale = "floatval"] 
    [ViewCenterX = "floatval"] 
    [ViewCenterY = "floatval"] 
    [RulerOffestX = "floatval"] 
    [RulerOffestY = "floatval"]> 
</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 information

Remarks

The Window element is only relevant for windows that relate to the drawing. This element is used to preserve exact window settings when roundtripping XML for Visio files. If this element is not specified, Visio applies default window settings when opening an XML for Visio 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.

<Windows ClientWidth="1024" ClientHeight="625">
  <Window ID="0" WindowType="Drawing" WindowState="1073741824" WindowLeft="-4" WindowTop="-23" WindowWidth="1032" WindowHeight="652" ContainerType="Page" Page="2" ViewScale="1" ViewCenterX="4.25" ViewCenterY="8.390625">
   …
  </Window>
  <Window ID="1" WindowType="Stencil" WindowState="67109889" WindowLeft="-195" WindowTop="-1" WindowWidth="187" WindowHeight="623" Document="C:\Program Files\Microsoft Office\Visio10\1033\Solutions\Visio Extras\Backgrounds (US units).vss" ParentWindow="0">
   …
  </Window>
  <Window ID="2" WindowType="Stencil" WindowState="1025" WindowLeft="-195" WindowTop="-1" WindowWidth="187" WindowHeight="623" Document="C:\Program Files\Microsoft Office\Visio10\1033\Solutions\Visio Extras\Borders and Titles (US units).vss" ParentWindow="0">
   … 
  </Window>
</Windows>

See also

Show:
© 2014 Microsoft