-
Notifications
You must be signed in to change notification settings - Fork 7
/
View2.xml
653 lines (651 loc) · 46 KB
/
View2.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
<Type Name="View2" FullName="Microsoft.Office.Interop.InfoPath.View2">
<TypeSignature Language="C#" Value="public interface View2 : Microsoft.Office.Interop.InfoPath.View" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract View2 implements class Microsoft.Office.Interop.InfoPath.View" />
<TypeSignature Language="DocId" Value="T:Microsoft.Office.Interop.InfoPath.View2" />
<TypeSignature Language="VB.NET" Value="Public Interface View2
Implements View" />
<TypeSignature Language="C++ CLI" Value="public interface class View2 : Microsoft::Office::Interop::InfoPath::View" />
<TypeSignature Language="F#" Value="type View2 = interface
 interface View" />
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces>
<Interface>
<InterfaceName>Microsoft.Office.Interop.InfoPath.View</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.Guid("096CD70C-0786-11D1-95FA-0080C78EE3BB")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Runtime.InteropServices.TypeLibType(4288)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>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.ViewObject" />.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="DisableAutoUpdate">
<MemberSignature Language="C#" Value="public void DisableAutoUpdate ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void DisableAutoUpdate() runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.DisableAutoUpdate" />
<MemberSignature Language="VB.NET" Value="Public Sub DisableAutoUpdate ()" />
<MemberSignature Language="C++ CLI" Value="public:
 void DisableAutoUpdate();" />
<MemberSignature Language="F#" Value="abstract member DisableAutoUpdate : unit -> unit" Usage="view2.DisableAutoUpdate " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.DisableAutoUpdate</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(7)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Disables automatic synchronization between a form's underlying XML document and the associated view.</summary>
<remarks>
<para>The views in a Microsoft InfoPath form are automatically synchronized with the data that is contained in a form's underlying XML document. You can override this by using the <b>DisableAutoUpdate</b> method. You may need to do this for performance reasons, such as when you are programmatically making many changes to a form's underlying XML document and you do not want the view to be refreshed until the changes are complete.</para>
<para>By default, views will be updated automatically when the application is idle. View synchronization can be re-enabled using the <see cref="M:Microsoft.Office.Interop.InfoPath.View.EnableAutoUpdate" /> method.</para>
<para />
</remarks>
<example>
<para>In the following example, the DisableAutoUpdate method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to disable synchronization between a form's underlying XML document and the view that it is associated with:</para>
<code>thisXDocument.View.<span class="label">DisableAutoUpdate</span>();</code>
</example>
</Docs>
</Member>
<Member MemberName="EnableAutoUpdate">
<MemberSignature Language="C#" Value="public void EnableAutoUpdate ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void EnableAutoUpdate() runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.EnableAutoUpdate" />
<MemberSignature Language="VB.NET" Value="Public Sub EnableAutoUpdate ()" />
<MemberSignature Language="C++ CLI" Value="public:
 void EnableAutoUpdate();" />
<MemberSignature Language="F#" Value="abstract member EnableAutoUpdate : unit -> unit" Usage="view2.EnableAutoUpdate " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.EnableAutoUpdate</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(8)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Enables automatic synchronization between a form's underlying XML document and the associated view.</summary>
<remarks>
<para>The views in a Microsoft Office InfoPath form are automatically synchronized with the data that is contained in a form's underlying XML document. However, this can be overridden using the <see cref="M:Microsoft.Office.Interop.InfoPath.View.DisableAutoUpdate" /> method. To re-enable synchronization, use the <b>EnableAutoUpdate</b> method.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>EnableAutoUpdate</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to enable synchronization between a form's underlying XML document and the view that it is associated with:</para>
<code>thisXDocument.View.EnableAutoUpdate();</code>
</example>
</Docs>
</Member>
<Member MemberName="ExecuteAction">
<MemberSignature Language="C#" Value="public void ExecuteAction (string bstrAction, object varXmlToEdit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ExecuteAction([in]string bstrAction, [in]object varXmlToEdit) runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.ExecuteAction(System.String,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub ExecuteAction (bstrAction As String, Optional varXmlToEdit As Object)" />
<MemberSignature Language="F#" Value="abstract member ExecuteAction : string * obj -> unit" Usage="view2.ExecuteAction (bstrAction, varXmlToEdit)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.ExecuteAction(System.String,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(14)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bstrAction" Type="System.String" />
<Parameter Name="varXmlToEdit" Type="System.Object" />
</Parameters>
<Docs>
<param name="bstrAction">The name of the editing action to perform.</param>
<param name="varXmlToEdit">The name of the field or group to which to apply the editing action. This is equivalent to the value of the name attribute in the <b>xmlToEdit</b> element of the form definition (.xsf) file.</param>
<summary>Executes a Microsoft Office InfoPath 2003 editing command against a form's underlying XML document, based on the data selected in the view.</summary>
<remarks>
<para>The <b>ExecuteAction</b> method is used to programmatically perform built-in InfoPath editing actions against a form's underlying XML document, based on the selected context in a view.</para>
<para>The action that is executed will be the same action that would be used when clicking on an equivalent menu or toolbar button; namely one for which the button element in the .xsf file has corresponding <b>xmlToEdit</b> and <b>action</b> attributes. As with using a button, the action will be based on current selection: it will act on the selected context (and in the case where the selection would lead the button to be disabled, then the <b>ExecuteAction</b> method will have no effect).</para>
<para>It is possible to first set the selection context by using the <see cref="M:Microsoft.Office.Interop.InfoPath.View2.SelectNodes(Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode,System.Object,System.Object)" /> method or <see cref="M:Microsoft.Office.Interop.InfoPath.View2.SelectText(Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode,System.Object)" /> method, then call the <b>ExecuteAction</b> method to act on that context.</para>
<para>The <b>ExecuteAction</b> method will return an error for the following reasons:</para>
<list type="bullet">
<item>
<description>The <paramref name="bstrAction" /> parameter does not contain a valid editing component name.</description>
</item>
<item>
<description>The <paramref name="varXmlToEdit" /> parameter does not match an editing component that is defined in the view.</description>
</item>
<item>
<description>The <paramref name="varXmlToEdit" /> parameter is required for a specific editing action.</description>
</item>
<item>
<description>The editing action is not applicable to the selected context.</description>
</item>
<item>
<description>The following is a table of parameter combinations that can be used with the <b>ExecuteAction</b> method.</description>
</item>
</list>
<list type="table">
<item>
<term>"Copy"</term>
<description>Copies the selected data to the clipboard.</description>
</item>
<item>
<term>"Paste"</term>
<description>Copies data from the clipboard to the insertion point.</description>
</item>
<item>
<term>"Cut"</term>
<description>Removes the selected data and copies it to the clipboard.</description>
</item>
<item>
<term>"Delete"</term>
<description>Deletes the selected data.</description>
</item>
<item>
<term>"xCollection::insert", "<paramref name="xmlToEdit" />"</term>
<description>Inserts data based on the selected context using the xCollection editing component. If current selection is within a container of the xCollection, specified by its <b>xmlToEdit</b> element in the .xsf, then the <b>fragmentToInsert</b> element data is appended within that container.</description>
</item>
<item>
<term>"xCollection::insertBefore", "<paramref name="xmlToEdit" />"</term>
<description>Inserts data before the selected context using the xCollection editing component. If current selection is within an item of the xCollection, as specified by its <b>xmlToEdit</b> element in the .xsf, then the <b>fragmentToInsert</b> element data is inserted before that item.</description>
</item>
<item>
<term>"xCollection::insertAfter", "<paramref name="xmlToEdit" />"</term>
<description>Inserts data after the selected context using the xCollection editing component. If current selection is within an item of the xCollection, as specified by its <b>xmlToEdit</b> element in the .xsf, then the <b>fragmentToInsert</b> element data is inserted after that item.</description>
</item>
<item>
<term>"xCollection::remove", "<paramref name="xmlToEdit" />"</term>
<description>Deletes data from the selected context using the xCollection editing component. If current selection is within an item of the xCollection, as specified by its <b>xmlToEdit</b> element in the .xsf, then that item is deleted.</description>
</item>
<item>
<term>"xCollection::removeAll", "<paramref name="xmlToEdit" />"</term>
<description>Deletes all data contained within the selected context using the xCollection editing component. If current selection is within a container of the xCollection, as specified by the <b>xmlToEdit</b> element in the .xsf, then this action deletes all the items within that container.</description>
</item>
<item>
<term>"xReplace::replace", "<paramref name="xmlToEdit" />"</term>
<description>Replaces the data in the selected context using the <b>xReplace</b> editing component. If current selection is within an item of the <b>xReplace</b>, as specified by its <b>xmlToEdit</b> element in the .xsf, then that item is replaced by the <b>fragmentToInsert</b> element data.</description>
</item>
<item>
<term>"xOptional::insert", "<paramref name="xmlToEdit" />"</term>
<description>Inserts data based on the selected context using the xOptional editing component. If current selection is within an container of the xOptional, as specified by its <b>xmlToEdit</b> element in the .xsf, then the <b>fragmentToInsert</b> element data is appended within that container.</description>
</item>
<item>
<term>"xOptional::remove", "<paramref name="xmlToEdit" />"</term>
<description>Deletes data from the selected context using the xOptional editing component. If current selection is within an item of the xOptional, as specified by its <b>xmlToEdit</b> element in the .xsf, then that item is deleted.</description>
</item>
</list>
<para>Note In some cases, calling the <b>ExecuteAction</b> method from the <see cref="E:Microsoft.Office.Interop.InfoPath._ButtonEventSink_Event.OnClick" /> for a button in a view may cause an error. This is because the selected context changes to the button when the button is clicked. In this case, it is better to use a button (or link) on a custom task pane, toolbar, or menu to call the <b>ExecuteAction</b> method.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>ExecuteAction</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to delete selected data and place it on the clipboard:</para>
<code>thisXDocument.View.<span class="label">ExecuteAction</span>("Cut", Type.Missing);</code>
<para>In the following example, the <b>ExecuteAction</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to insert data using the xCollection editing component, based on the selected context:</para>
<code>thisXDocument.View.<span class="label">ExecuteAction</span>("xCollection::insert", "group1_1");</code>
</example>
</Docs>
</Member>
<Member MemberName="Export">
<MemberSignature Language="C#" Value="public void Export (string bstrURL, string bstrFormat);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Export([in]string bstrURL, [in]string bstrFormat) runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.Export(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub Export (bstrURL As String, bstrFormat As String)" />
<MemberSignature Language="C++ CLI" Value="public:
 void Export(System::String ^ bstrURL, System::String ^ bstrFormat);" />
<MemberSignature Language="F#" Value="abstract member Export : string * string -> unit" Usage="view2.Export (bstrURL, bstrFormat)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.Export(System.String,System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(9)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bstrURL" Type="System.String" />
<Parameter Name="bstrFormat" Type="System.String" />
</Parameters>
<Docs>
<param name="bstrURL">The directory location that the exported view file will be written to.</param>
<param name="bstrFormat">The type of file format to export to. Only the "MHT" value is supported.</param>
<summary>Exports the view to a file of the specified format.</summary>
<remarks>
<para>If used in a form that is not fully trusted, the <b>Export</b> method will return a "permission denied" error.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>Export</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to export the current view:</para>
<code>thisXDocument.View.<span class="label">Export</span>(@"C:\MyView.mht", "MHT");</code>
</example>
</Docs>
</Member>
<Member MemberName="ExportAsFixedFormat">
<MemberSignature Language="C#" Value="public void ExportAsFixedFormat (string bstrURL, string bstrFormat, object varExporter);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ExportAsFixedFormat([in]string bstrURL, [in]string bstrFormat, [in]object varExporter) runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.ExportAsFixedFormat(System.String,System.String,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub ExportAsFixedFormat (bstrURL As String, bstrFormat As String, varExporter As Object)" />
<MemberSignature Language="C++ CLI" Value="public:
 void ExportAsFixedFormat(System::String ^ bstrURL, System::String ^ bstrFormat, System::Object ^ varExporter);" />
<MemberSignature Language="F#" Value="abstract member ExportAsFixedFormat : string * string * obj -> unit" Usage="view2.ExportAsFixedFormat (bstrURL, bstrFormat, varExporter)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(15)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bstrURL" Type="System.String" />
<Parameter Name="bstrFormat" Type="System.String" />
<Parameter Name="varExporter" Type="System.Object" />
</Parameters>
<Docs>
<param name="bstrURL">The directory location that the exported view file will be written to.</param>
<param name="bstrFormat">The type of file format to export to. The supported values are:"MHT" - Web Archive, single file format (.mht)"PDF" - Portable Document Format file (.pdf)"XPS" - XPS Document (.xps)</param>
<param name="varExporter">To be added.</param>
<summary>Exports the view to a file of the specified format, and supports initializing a COM add-in for exporting to a fixed-format file.</summary>
<remarks>
<para>The <paramref name="pUnkExporter" /> parameter is used to provide an <b>IUnknown</b> interface pointer to the active document. This is used to initialize a COM add-in for exporting to a fixed-format file. For more information, see the article "Extending the Office Fixed-Format Export Feature" on <a href="http://go.microsoft.com/fwlink?LinkId=61826">Microsoft Developer Network (MSDN)</a></para>
<para>
<b>Note</b>: You can save as a PDF or XPS file from a Microsoft Office system program only after you install an add-in. For more information, search for "Enable support for other file formats, such as PDF and XPS" on Office Online.</para>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="ForceUpdate">
<MemberSignature Language="C#" Value="public void ForceUpdate ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ForceUpdate() runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.ForceUpdate" />
<MemberSignature Language="VB.NET" Value="Public Sub ForceUpdate ()" />
<MemberSignature Language="C++ CLI" Value="public:
 void ForceUpdate();" />
<MemberSignature Language="F#" Value="abstract member ForceUpdate : unit -> unit" Usage="view2.ForceUpdate " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.ForceUpdate</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(6)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Forces synchronization between a form's underlying XML document and the associated view.</summary>
<remarks>
<para>The views in a Microsoft Office InfoPath form are automatically synchronized with the data that is contained in a form's underlying XML document. However, you can force synchronization to occur using the <b>ForceUpdate</b> method. This is also useful when data in a secondary data source has changed and needs to be refreshed in the view.</para>
<para>Automatic synchronization can be disabled using the <see cref="M:Microsoft.Office.Interop.InfoPath.View.DisableAutoUpdate" /> method and enabled using the <see cref="M:Microsoft.Office.Interop.InfoPath.View.EnableAutoUpdate" /> method.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>ForceUpdate</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to force synchronization between a form's underlying XML document and the view that it is associated with:</para>
<code>thisXDocument.View.<span class="label">ForceUpdate</span>();</code>
</example>
</Docs>
</Member>
<Member MemberName="GetContextNodes">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.XMLNodesCollection GetContextNodes (object varNode, object varViewContext);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Office.Interop.InfoPath.XMLNodesCollection GetContextNodes([in]object varNode, [in]object varViewContext) runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.GetContextNodes(System.Object,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function GetContextNodes (Optional varNode As Object, Optional varViewContext As Object) As XMLNodesCollection" />
<MemberSignature Language="F#" Value="abstract member GetContextNodes : obj * obj -> Microsoft.Office.Interop.InfoPath.XMLNodesCollection" Usage="view2.GetContextNodes (varNode, varViewContext)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.GetContextNodes(System.Object,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(11)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.XMLNodesCollection</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="varNode" Type="System.Object" />
<Parameter Name="varViewContext" Type="System.Object" />
</Parameters>
<Docs>
<param name="varNode">An XML DOM node. </param>
<param name="varViewContext">The ID of the control that is used for the context.</param>
<summary>Gets a reference to an <see cref="T:Microsoft.Office.Interop.InfoPath.XMLNodesCollection" /> collection that is populated with XML Document Object Model (DOM) nodes based on the current context.</summary>
<returns>A reference to the <b>XMLNodesCollection</b> collection.</returns>
<remarks>
<para>The collection returned by the <b>GetContextNodes</b> 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. </para>
<para>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 <see cref="M:Microsoft.Office.Interop.InfoPath.View2.SelectNodes(Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode,System.Object,System.Object)" /> method.</para>
<para>
<b>Note</b>: The <b>GetContextNodes</b> method will not return nodes based on the current selection if used in the <see cref="E:Microsoft.Office.Interop.InfoPath._ButtonEventSink_Event.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 <b>GetContextNodes</b> method from a custom task pane, menu or toolbar.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>GetContextNodes</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to return a collection of XML DOM nodes based on the current context. The code then loops through the collection of XML DOM nodes looking for a particular node. When it is found, the text of <paramref name="field1" /> is updated. This example requires a structure of a repeating section named <paramref name="group1" /> containing a field named <paramref name="field1" />.</para>
<code>XMLNodesCollection contextNodes = thisXDocument.View.<span class="label">GetContextNodes</span>(Type.Missing, Type.Missing);
// Scan the list of context nodes for an field1 node and if one is found
// update its text.
foreach (IXMLDOMNode contextNode in contextNodes)
{
if (contextNode.nodeName == "my:group1")
{
contextNode.selectSingleNode("my:field1").text = "found node";
break;
}
}</code>
</example>
</Docs>
</Member>
<Member MemberName="GetSelectedNodes">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.XMLNodesCollection GetSelectedNodes ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Office.Interop.InfoPath.XMLNodesCollection GetSelectedNodes() runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.GetSelectedNodes" />
<MemberSignature Language="VB.NET" Value="Public Function GetSelectedNodes () As XMLNodesCollection" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::Office::Interop::InfoPath::XMLNodesCollection ^ GetSelectedNodes();" />
<MemberSignature Language="F#" Value="abstract member GetSelectedNodes : unit -> Microsoft.Office.Interop.InfoPath.XMLNodesCollection" Usage="view2.GetSelectedNodes " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.GetSelectedNodes</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(10)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.XMLNodesCollection</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a reference to an <see cref="T:Microsoft.Office.Interop.InfoPath.XMLNodesCollection" /> collection that is populated with XML Document Object Model (DOM) nodes based on the current selection of items in a view.</summary>
<returns>A reference to the <b>XMLNodesCollection</b> collection.</returns>
<remarks>
<para>If no items are selected in a view, or if only text is selected, then the <b>GetSelectedNodes</b> method returns an empty collection.</para>
<para>
<b>Note</b>: The <b>GetSelectedNodes</b> method will not return nodes based on the current selection if used in the <see cref="E:Microsoft.Office.Interop.InfoPath._ButtonEventSink_Event.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 <b>GetSelectedNodes</b> method from a custom task pane, menu or toolbar.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>GetSelectedNodes</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to set a reference to a collection of XML DOM nodes based on what is currently selected in the view. Then the code determines whether nodes were returned and, if they were, displays information about the first node found in the <see cref="T:Microsoft.Office.Interop.InfoPath.XMLNodesCollection" /> collection in a message box.</para>
<code>XMLNodesCollection selectedNodes = thisXDocument.View.<span class="label">GetSelectedNodes</span>();
if (selectedNodes.Count &gt; 0)
{
thisXDocument.UI.Alert(selectedNodes[0].nodeName + "\n\n" + selectedNodes[0].text);
}</code>
</example>
</Docs>
</Member>
<Member MemberName="Name">
<MemberSignature Language="C#" Value="public string Name { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Name" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.View2.Name" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Name As String" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Name { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Name : string" Usage="Microsoft.Office.Interop.InfoPath.View2.Name" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.View.Name</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(1)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>get: System.Runtime.InteropServices.DispId(1)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the view.</summary>
<value>To be added.</value>
<remarks>
<para>To determine the default view use the <see cref="P:Microsoft.Office.Interop.InfoPath.ViewInfo.IsDefault" /> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewInfoObject" /> object.</para>
<para />
</remarks>
<example>
<para>In the following example the <b>Name</b> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to determine which view the user has switched to. If the view is the "Archive Customer" view, a note value is added to the form's underlying XML document:</para>
<code>if (thisXDocument.View.<span class="label">Name</span> == @"Archive Customer")
{
IXMLDOMNode notes = thisXDocument.DOM.selectSingleNode(@"/Customers/CustomerInfo/Notes");
IXMLDOMNode div = thisXDocument.DOM.createNode(1, "div", @"http://www.w3.org/1999/xhtml");
div.text = "Note recorded " + thisXDocument.Util.Date.Now().ToString();
notes.appendChild(div);
}</code>
</example>
</Docs>
</Member>
<Member MemberName="SelectNodes">
<MemberSignature Language="C#" Value="public void SelectNodes (Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode pxnStartNode, object varEndNode, object varViewContext);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void SelectNodes([in]class Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode pxnStartNode, [in]object varEndNode, [in]object varViewContext) runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.SelectNodes(Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode,System.Object,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub SelectNodes (pxnStartNode As IXMLDOMNode, Optional varEndNode As Object, Optional varViewContext As Object)" />
<MemberSignature Language="F#" Value="abstract member SelectNodes : Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode * obj * obj -> unit" Usage="view2.SelectNodes (pxnStartNode, varEndNode, varViewContext)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.SelectNodes(Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode,System.Object,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(12)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pxnStartNode" Type="Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode" />
<Parameter Name="varEndNode" Type="System.Object" />
<Parameter Name="varViewContext" Type="System.Object" />
</Parameters>
<Docs>
<param name="pxnStartNode">The XML DOM node that begins the range.</param>
<param name="varEndNode">The XML DOM node that ends the range. If not specified, only the starting XML DOM node will be used.</param>
<param name="varViewContext">The ID of the control that is used for the context, which is an element with the specified view context of <b>xd:CtrlId</b>.</param>
<summary>Selects a range of nodes in a view based on the specified starting XML Document Object Model (DOM) node, the ending XML DOM node, and the view context.</summary>
<remarks>
<para>If a view context is specified, all of the XML DOM nodes that are to be selected must be within that context.</para>
<para>If any of the arguments to the <b>SelectNodes</b> method are null or are not exposed in the view, the <b>SelectNodes</b> method will return an error. In addition, if there are more than one set of view elements which map to the same specified XML DOM nodes, within the specified view context, then the <b>SelectNodes</b> method will also return an error.</para>
<para>
<b>Note</b>: The <b>SelectNodes</b> method requires that the nodes be structurally selectable in the view.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>SelectNodes</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to set selection on a single item in the view, corresponding to the specified XML DOM node. Using the <see cref="M:Microsoft.Office.Interop.InfoPath.View.GetSelectedNodes" /> method of the <b>View</b> object, the code then determines whether the selection has been successful by displaying information about the XML DOM node in a message box. This example requires a repeating table named <paramref name="group1" />. The first occurrence is selected:</para>
<code>XMLNodesCollection selectedNodes;
IXMLDOMNode group1;
group1 = thisXDocument.DOM.selectSingleNode(@"//my:group1");
thisXDocument.View.<span class="label">SelectNodes</span>(group1, Type.Missing, Type.Missing);
selectedNodes = thisXDocument.View.GetSelectedNodes();
if (selectedNodes.Count &gt; 0)
{
thisXDocument.UI.Alert(selectedNodes[0].nodeName + "\n\n" + selectedNodes[0].text);
}</code>
</example>
</Docs>
</Member>
<Member MemberName="SelectText">
<MemberSignature Language="C#" Value="public void SelectText (Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode pxnField, object varViewContext);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void SelectText([in]class Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode pxnField, [in]object varViewContext) runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.SelectText(Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub SelectText (pxnField As IXMLDOMNode, Optional varViewContext As Object)" />
<MemberSignature Language="F#" Value="abstract member SelectText : Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode * obj -> unit" Usage="view2.SelectText (pxnField, varViewContext)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.SelectText(Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(13)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pxnField" Type="Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode" />
<Parameter Name="varViewContext" Type="System.Object" />
</Parameters>
<Docs>
<param name="pxnField">The XML DOM node.</param>
<param name="varViewContext">The ID of the control that is used for the context, which is an element with the specified view context of <b>xd:CtrlId</b>.</param>
<summary>Selects the text contained in an editable field that is bound to the specified XML Document Object Model (DOM) node.</summary>
<remarks>
<para>If a view context is specified, then the editable field that is to be selected must be within that context.</para>
<para>If there are more than one set of view elements which map to the same specified XML DOM node, within the given view context, then the <b>SelectText</b> method will return an error. In addition, if any of the arguments to the <b>SelectText</b> method are a null reference (Nothing in Visual Basic) or are not exposed in the view, then the <b>SelectText</b> method will also return an error.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>SelectText</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to select text inside a field that is bound to an XML DOM node:</para>
<code>IXMLDOMNode field1;
field1 = thisXDocument.DOM.selectSingleNode(@"/my:myFields/my:field1");
thisXDocument.View.<span class="label">SelectText</span>(field1, Type.Missing);</code>
</example>
</Docs>
</Member>
<Member MemberName="SwitchView">
<MemberSignature Language="C#" Value="public void SwitchView (string bstrName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void SwitchView([in]string bstrName) runtime managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.View2.SwitchView(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub SwitchView (bstrName As String)" />
<MemberSignature Language="C++ CLI" Value="public:
 void SwitchView(System::String ^ bstrName);" />
<MemberSignature Language="F#" Value="abstract member SwitchView : string -> unit" Usage="view2.SwitchView bstrName" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.View.SwitchView(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(2)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bstrName" Type="System.String" />
</Parameters>
<Docs>
<param name="bstrName">The name of the view to switch to. If an empty string is used, the default view is displayed.</param>
<summary>Changes the active view of a Microsoft InfoPath form to a specified view.</summary>
<remarks>
<para>If an empty string is used as the <paramref name="bstrName" /> parameter, the view is changed to the default view of the form.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>SwitchView</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.ViewObject" /> object is used to change the current view to the default view:</para>
<code>thisXDocument.View.<span class="label">SwitchView</span>("");</code>
</example>
</Docs>
</Member>
<Member MemberName="Window">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.WindowObject Window { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Office.Interop.InfoPath.WindowObject Window" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.View2.Window" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Window As WindowObject" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::Office::Interop::InfoPath::WindowObject ^ Window { Microsoft::Office::Interop::InfoPath::WindowObject ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Window : Microsoft.Office.Interop.InfoPath.WindowObject" Usage="Microsoft.Office.Interop.InfoPath.View2.Window" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.View.Window</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath</AssemblyName>
<AssemblyVersion>15.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(4)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>get: System.Runtime.InteropServices.DispId(4)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.WindowObject</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the window associated with the view.</summary>
<value>To be added.</value>
<remarks>
<para>The <see cref="T:Microsoft.Office.Interop.InfoPath.WindowObject" /> object returned represents the currently active Microsoft Office InfoPath 2003 window. It can also be accessed through the <see cref="T:Microsoft.Office.Interop.InfoPath.WindowsCollection" /> collection.</para>
<para />
</remarks>
<example>
<para>In the following example, the Window property of the View object is used to set a reference to the first task pane contained in the TaskPanes collection:</para>
<para>[C#]</para>
<code>TaskPane taskPane;
taskPane = thisXDocument.View.<span class="label">Window</span>.TaskPanes[0];</code>
</example>
</Docs>
</Member>
</Members>
</Type>