_XDocument3.ViewInfos Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a reference to the ViewInfosCollection collection associated with a Microsoft Office InfoPath form.
public:
property Microsoft::Office::Interop::InfoPath::ViewInfosCollection ^ ViewInfos { Microsoft::Office::Interop::InfoPath::ViewInfosCollection ^ get(); };
public Microsoft.Office.Interop.InfoPath.ViewInfosCollection ViewInfos { get; }
member this.ViewInfos : Microsoft.Office.Interop.InfoPath.ViewInfosCollection
Public ReadOnly Property ViewInfos As ViewInfosCollection
Property Value
A reference to the ViewInfosCollection collection associated with a form.
Implements
Examples
In the following example, the ViewInfos property of the XDocument object is used to set a reference to the ViewInfosCollection collection; then, using the Count property of the ViewInfosCollection collection, it loops through the collection to determine the default view using the IsDefault property of the ViewInfoObject object. When the default view is found, the code displays the name of the view in a message box.
<span class="label">ViewInfos</span> viewInfos;
viewInfos = thisXDocument.<span class="label">ViewInfos</span>;
for (int i=0; i < viewInfos.Count; i++)
{
if (viewInfos[i].IsDefault)
{
thisXDocument.UI.Alert("The default view is: " + viewInfos[i].Name);
}
}
In the following example, the ViewInfos property of the XDocument object is used to set a reference to the ViewInfosCollection collection; then, using the Count property of the ViewInfosCollection collection, it loops through the collection to determine the default view using the IsDefault property of the ViewInfoObject object. When the default view is found, the code displays the name of the view in a message box.
<span class="label">ViewInfos</span> viewInfos;
viewInfos = thisXDocument.<span class="label">ViewInfos</span>;
for (int i=0; i < viewInfos.Count; i++)
{
if (viewInfos[i].IsDefault)
{
thisXDocument.UI.Alert("The default view is: " + viewInfos[i].Name);
}
}
Remarks
The ViewInfos collection contains a collection of ViewInfoObject object containing information about each of the views implemented in an InfoPath form.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기