-
Notifications
You must be signed in to change notification settings - Fork 7
/
WindowsCollection.xml
68 lines (64 loc) · 4.26 KB
/
WindowsCollection.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<Type Name="WindowsCollection" FullName="Microsoft.Office.Interop.InfoPath.WindowsCollection">
<TypeSignature Language="C#" Value="public interface WindowsCollection : Microsoft.Office.Interop.InfoPath.Windows" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract WindowsCollection implements class Microsoft.Office.Interop.InfoPath.Windows" />
<TypeSignature Language="DocId" Value="T:Microsoft.Office.Interop.InfoPath.WindowsCollection" />
<TypeSignature Language="VB.NET" Value="Public Interface WindowsCollection
Implements Windows" />
<TypeSignature Language="C++ CLI" Value="public interface class WindowsCollection : Microsoft::Office::Interop::InfoPath::Windows" />
<TypeSignature Language="F#" Value="type WindowsCollection = interface
 interface Windows" />
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces>
<Interface>
<InterfaceName>Microsoft.Office.Interop.InfoPath.Windows</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.CoClass(typeof(Microsoft.Office.Interop.InfoPath.WindowsCollectionClass))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Runtime.InteropServices.Guid("096CD58B-0786-11D1-95FA-0080C78EE3BB")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Contains a <see cref="T:Microsoft.Office.Interop.InfoPath.WindowObject" /> object for each Microsoft Office InfoPath 2003 window that is currently open.</summary>
<remarks>
<para>This type is a wrapper for a COM interface implemented by a coclass that is required by managed code for COM interoperability. To access the members specified by this interface, use the type that wraps the coclass that implements this interface. For information about that type, including usage, remarks, and examples, see<see cref="T:Microsoft.Office.Interop.InfoPath.Windows" />.</para>
<para>
<b>WindowObject</b> objects represent the two types of windows that are used in the InfoPath application: the editing window that is used as the form area when a user fills out a form, and the designing window that is used as the design mode when a user designs a form.</para>
<para>The <b>WindowsCollection</b> collection implements properties that can be used to access a form's associated Window objects, and it is accessible through the <see cref="P:Microsoft.Office.Interop.InfoPath._Application2.Windows" /> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.Application" /> object.</para>
<para>
<b>Note</b>: The <b>WindowsCollection</b> collection can be used only to get the count of <b>WindowObject</b> objects that it contains or to return a reference to a specified <b>WindowObject</b> object. It cannot be used to create, add, or remove <b>WindowObject</b> objects.</para>
<para />
</remarks>
<example>
<para>In the following example, implemented as an <see cref="E:Microsoft.Office.Interop.InfoPath._ButtonEventSink_Event.OnClick" /> event handler for a button on a form, the <see cref="P:Microsoft.Office.Interop.InfoPath._Application2.Windows" /> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.Application" /> object is used to set a reference to the <b>WindowsCollection</b> collection. The code then loops through the collection and displays the type of each Window object that it contains.</para>
<code>public void ShowWindowTypes_OnClick(DocActionEvent e)
{
// Set a reference to the Windows collection.
<span class="label">WindowsCollection</span> windows = thisApplication.Windows;
// Loop through the collection and display the type
// of each Window object that it contains.
for (int i=0; i &lt; windows.Count; i++)
{
string windowType = "";
switch (windows[i].WindowType)
{
case XdWindowType.xdEditorWindow:
windowType = "Editing window";
break;
case XdWindowType.xdDesignerWindow:
windowType = "Designing window";
break;
}
thisXDocument.UI.Alert("Window type " + i + ": " + windowType);
}
}
</code>
<para>For code examples, see How to: Work with Form Windows.</para>
</example>
</Docs>
<Members />
</Type>