ViewInfos Collection


ViewInfos Collection

The ViewInfos collection contains a ViewInfo object for each view in the current solution. This object provides descriptive information about each view. The ViewInfos collection contains the properties shown in Table A.16.

Table A.16: Properties of The Viewinfos Collection.

Name

Security Level

Description

Count Property

1

A read-only property that contains a total count of the current number of ViewInfo objects

Item Property

1

A read-only property that returns a reference to the specified ViewInfo object from the collection

Note  

This collection cannot be used to create, add, or remove ViewInfo objects.

Listing A.4 loops through all the current views within a solution file and displays their names .

Listing A.4:
start example
 // Set a reference to the ViewInfos collection. var objViewInfos = XDocument.ViewInfos; // Loop through the collection and display the namefor (i=0; i <  objViewInfos.Count; i++)   {           XDocument.UI.Alert("View name: "  +       objViewInfos(i).Name);   } 
end example
 



Programming Microsoft Infopath. A Developers Guide
Programming Microsoft Infopath: A Developers Guide
ISBN: 1584504536
EAN: 2147483647
Year: 2006
Pages: 111
Authors: Thom Robbins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net