View3.GetContextNodes(Object, Object) Method
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 an XMLNodesCollection collection that is populated with XML Document Object Model (DOM) nodes based on the current context.
public Microsoft.Office.Interop.InfoPath.XMLNodesCollection GetContextNodes (object varNode, object varViewContext);
abstract member GetContextNodes : obj * obj -> Microsoft.Office.Interop.InfoPath.XMLNodesCollection
Public Function GetContextNodes (Optional varNode As Object, Optional varViewContext As Object) As XMLNodesCollection
Parameters
- varNode
- Object
An XML DOM node.
- varViewContext
- Object
The ID of the control that is used for the context.
Returns
A reference to the XMLNodesCollection.
Implements
Remarks
The collection returned by the GetContextNodes method consists of the sequence of XML DOM nodes that are mapped from the view, corresponding to the current XSL Transformation (XSLT) node, starting at the current selection and walking up through the view ancestors to the BODY tag.
If no parameters are used, the context nodes are based on the current selection. If parameters are used, then the context nodes returned are those that would be returned based on the selection that would be obtained from calling the Microsoft.Office.Interop.InfoPath.View3.SelectNodes(Microsoft.Office.Interop.InfoPath.IXMLDOMNode,System.Object,System.Object) method.
Note: The GetContextNodes method will not return nodes based on the current selection if used in the OnClick event of a button in the view, since the focus is lost from the control that is intended to be in context. To avoid this behavior, use the GetContextNodes method from a custom task pane, menu or toolbar.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기