-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathCommandManager.xml
882 lines (801 loc) · 59.3 KB
/
CommandManager.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
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
<Type Name="CommandManager" FullName="System.Windows.Input.CommandManager">
<TypeSignature Language="C#" Value="public sealed class CommandManager" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit CommandManager extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Windows.Input.CommandManager" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class CommandManager" />
<TypeSignature Language="F#" Value="type CommandManager = class" />
<TypeSignature Language="C++ CLI" Value="public ref class CommandManager sealed" />
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides command related utility methods that register <see cref="T:System.Windows.Input.CommandBinding" /> and <see cref="T:System.Windows.Input.InputBinding" /> objects for class owners and commands, add and remove command event handlers, and provides services for querying the status of a command.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Input.CommandManager> is responsible for managing routed commands. For more information about commanding, see [Commanding Overview](/dotnet/framework/wpf/advanced/commanding-overview).
Use <xref:System.Windows.Input.CommandManager.RegisterClassCommandBinding%2A> to register a <xref:System.Windows.Input.CommandBinding> to a class as opposed to an instance.
Use <xref:System.Windows.Input.CommandManager.RegisterClassInputBinding%2A> to register an <xref:System.Windows.Input.InputBinding> to a class as opposed to an instance.
The <xref:System.Windows.Input.CommandManager.InvalidateRequerySuggested%2A> method forces the <xref:System.Windows.Input.CommandManager> to raise the <xref:System.Windows.Input.CommandManager.RequerySuggested> event. The <xref:System.Windows.Input.CommandManager.RequerySuggested> event informs a command source to query the command it is associated with to determine whether or not the command can execute.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Input.RoutedCommand" />
<altmember cref="T:System.Windows.Input.CommandBinding" />
<altmember cref="T:System.Windows.Input.ICommandSource" />
<altmember cref="T:System.Windows.Input.ICommand" />
</Docs>
<Members>
<Member MemberName="AddCanExecuteHandler">
<MemberSignature Language="C#" Value="public static void AddCanExecuteHandler (System.Windows.UIElement element, System.Windows.Input.CanExecuteRoutedEventHandler handler);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void AddCanExecuteHandler(class System.Windows.UIElement element, class System.Windows.Input.CanExecuteRoutedEventHandler handler) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.AddCanExecuteHandler(System.Windows.UIElement,System.Windows.Input.CanExecuteRoutedEventHandler)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub AddCanExecuteHandler (element As UIElement, handler As CanExecuteRoutedEventHandler)" />
<MemberSignature Language="F#" Value="static member AddCanExecuteHandler : System.Windows.UIElement * System.Windows.Input.CanExecuteRoutedEventHandler -> unit" Usage="System.Windows.Input.CommandManager.AddCanExecuteHandler (element, handler)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void AddCanExecuteHandler(System::Windows::UIElement ^ element, System::Windows::Input::CanExecuteRoutedEventHandler ^ handler);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
<Parameter Name="handler" Type="System.Windows.Input.CanExecuteRoutedEventHandler" />
</Parameters>
<Docs>
<param name="element">The element to attach <paramref name="handler" /> to.</param>
<param name="handler">The can execute handler.</param>
<summary>Attaches the specified <see cref="T:System.Windows.Input.CanExecuteRoutedEventHandler" /> to the specified element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example creates a <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and an <xref:System.Windows.Input.ExecutedRoutedEventHandler> and attaches them to a <xref:System.Windows.Controls.Button> which is a command source for the <xref:System.Windows.Input.ApplicationCommands.Help%2A> command.
First, the <xref:System.Windows.Controls.Button> is created and associated with the <xref:System.Windows.Input.ApplicationCommands.Help%2A> command.
:::code language="xaml" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml" id="Snippetcommandingoverviewcmdmanageraddhandlersxaml":::
Next, the <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and the <xref:System.Windows.Input.ExecutedRoutedEventHandler> are created.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagerexecutedhandler":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagerexecutedhandler":::
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagercanexecutehandler":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagercanexecutehandler":::
And finally, the handlers are attached to the <xref:System.Windows.Controls.Button> using the <xref:System.Windows.Input.CommandManager.AddCanExecuteHandler%2A> and <xref:System.Windows.Input.CommandManager.AddExecutedHandler%2A>.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanageraddhandlers":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanageraddhandlers":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="element" /> or <paramref name="handler" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Windows.Input.RoutedCommand" />
<altmember cref="T:System.Windows.Input.ICommand" />
</Docs>
</Member>
<Member MemberName="AddExecutedHandler">
<MemberSignature Language="C#" Value="public static void AddExecutedHandler (System.Windows.UIElement element, System.Windows.Input.ExecutedRoutedEventHandler handler);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void AddExecutedHandler(class System.Windows.UIElement element, class System.Windows.Input.ExecutedRoutedEventHandler handler) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.AddExecutedHandler(System.Windows.UIElement,System.Windows.Input.ExecutedRoutedEventHandler)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub AddExecutedHandler (element As UIElement, handler As ExecutedRoutedEventHandler)" />
<MemberSignature Language="F#" Value="static member AddExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -> unit" Usage="System.Windows.Input.CommandManager.AddExecutedHandler (element, handler)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void AddExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
<Parameter Name="handler" Type="System.Windows.Input.ExecutedRoutedEventHandler" />
</Parameters>
<Docs>
<param name="element">The element to attach <paramref name="handler" /> to.</param>
<param name="handler">The executed handler.</param>
<summary>Attaches the specified <see cref="T:System.Windows.Input.ExecutedRoutedEventHandler" /> to the specified element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example creates a <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and an <xref:System.Windows.Input.ExecutedRoutedEventHandler> and attaches them to a <xref:System.Windows.Controls.Button> which is a command source for the <xref:System.Windows.Input.ApplicationCommands.Help%2A> command.
First, the <xref:System.Windows.Controls.Button> is created and associated with the <xref:System.Windows.Input.ApplicationCommands.Help%2A> command.
:::code language="xaml" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml" id="Snippetcommandingoverviewcmdmanageraddhandlersxaml":::
Next, the <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and the <xref:System.Windows.Input.ExecutedRoutedEventHandler> are created.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagerexecutedhandler":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagerexecutedhandler":::
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagercanexecutehandler":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagercanexecutehandler":::
And finally, the handlers are attached to the <xref:System.Windows.Controls.Button> using the <xref:System.Windows.Input.CommandManager.AddCanExecuteHandler%2A> and <xref:System.Windows.Input.CommandManager.AddExecutedHandler%2A>.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanageraddhandlers":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanageraddhandlers":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="element" /> or <paramref name="handler" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Windows.Input.RoutedCommand" />
<altmember cref="T:System.Windows.Input.ICommand" />
</Docs>
</Member>
<Member MemberName="AddPreviewCanExecuteHandler">
<MemberSignature Language="C#" Value="public static void AddPreviewCanExecuteHandler (System.Windows.UIElement element, System.Windows.Input.CanExecuteRoutedEventHandler handler);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void AddPreviewCanExecuteHandler(class System.Windows.UIElement element, class System.Windows.Input.CanExecuteRoutedEventHandler handler) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.AddPreviewCanExecuteHandler(System.Windows.UIElement,System.Windows.Input.CanExecuteRoutedEventHandler)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub AddPreviewCanExecuteHandler (element As UIElement, handler As CanExecuteRoutedEventHandler)" />
<MemberSignature Language="F#" Value="static member AddPreviewCanExecuteHandler : System.Windows.UIElement * System.Windows.Input.CanExecuteRoutedEventHandler -> unit" Usage="System.Windows.Input.CommandManager.AddPreviewCanExecuteHandler (element, handler)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void AddPreviewCanExecuteHandler(System::Windows::UIElement ^ element, System::Windows::Input::CanExecuteRoutedEventHandler ^ handler);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
<Parameter Name="handler" Type="System.Windows.Input.CanExecuteRoutedEventHandler" />
</Parameters>
<Docs>
<param name="element">The element to attach <paramref name="handler" /> to.</param>
<param name="handler">The can execute handler.</param>
<summary>Attaches the specified <see cref="T:System.Windows.Input.CanExecuteRoutedEventHandler" /> to the specified element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example creates a <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and an <xref:System.Windows.Input.ExecutedRoutedEventHandler> and attaches them to a <xref:System.Windows.Controls.Button> which is a command source for the <xref:System.Windows.Input.ApplicationCommands.Help%2A> command.
First, the <xref:System.Windows.Controls.Button> is created and associated with the <xref:System.Windows.Input.ApplicationCommands.Help%2A> command.
:::code language="xaml" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml" id="Snippetcommandingoverviewcmdmanageraddhandlersxaml":::
Next, the <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and the <xref:System.Windows.Input.ExecutedRoutedEventHandler> are created.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagerexecutedhandler":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagerexecutedhandler":::
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagercanexecutehandler":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagercanexecutehandler":::
Finally, the handlers are attached to the <xref:System.Windows.Controls.Button> using the <xref:System.Windows.Input.CommandManager.AddCanExecuteHandler%2A> and <xref:System.Windows.Input.CommandManager.AddExecutedHandler%2A>.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanageraddhandlers":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanageraddhandlers":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="element" /> or <paramref name="handler" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Windows.Input.RoutedCommand" />
<altmember cref="T:System.Windows.Input.ICommand" />
</Docs>
</Member>
<Member MemberName="AddPreviewExecutedHandler">
<MemberSignature Language="C#" Value="public static void AddPreviewExecutedHandler (System.Windows.UIElement element, System.Windows.Input.ExecutedRoutedEventHandler handler);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void AddPreviewExecutedHandler(class System.Windows.UIElement element, class System.Windows.Input.ExecutedRoutedEventHandler handler) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.AddPreviewExecutedHandler(System.Windows.UIElement,System.Windows.Input.ExecutedRoutedEventHandler)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub AddPreviewExecutedHandler (element As UIElement, handler As ExecutedRoutedEventHandler)" />
<MemberSignature Language="F#" Value="static member AddPreviewExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -> unit" Usage="System.Windows.Input.CommandManager.AddPreviewExecutedHandler (element, handler)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void AddPreviewExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
<Parameter Name="handler" Type="System.Windows.Input.ExecutedRoutedEventHandler" />
</Parameters>
<Docs>
<param name="element">The element to attach <paramref name="handler" /> to.</param>
<param name="handler">The can execute handler.</param>
<summary>Attaches the specified <see cref="T:System.Windows.Input.ExecutedRoutedEventHandler" /> to the specified element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example creates a <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and an <xref:System.Windows.Input.ExecutedRoutedEventHandler> and attaches them to a <xref:System.Windows.Controls.Button> which is a command source for the <xref:System.Windows.Input.ApplicationCommands.Help%2A> command.
First, the <xref:System.Windows.Controls.Button> is created and associated with the <xref:System.Windows.Input.ApplicationCommands.Help%2A> command.
:::code language="xaml" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml" id="Snippetcommandingoverviewcmdmanageraddhandlersxaml":::
Next, the <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and the <xref:System.Windows.Input.ExecutedRoutedEventHandler> are created.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagerexecutedhandler":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagerexecutedhandler":::
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagercanexecutehandler":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagercanexecutehandler":::
Finally, the handlers are attached to the <xref:System.Windows.Controls.Button> using the <xref:System.Windows.Input.CommandManager.AddCanExecuteHandler%2A> and <xref:System.Windows.Input.CommandManager.AddExecutedHandler%2A>.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanageraddhandlers":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanageraddhandlers":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="element" /> or <paramref name="handler" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Windows.Input.RoutedCommand" />
<altmember cref="T:System.Windows.Input.ICommand" />
</Docs>
</Member>
<Member MemberName="CanExecute">
<MemberSignature Language="C#" Value="see AddCanExecuteHandler, and RemoveCanExecuteHandler" />
<MemberSignature Language="ILAsm" Value="see AddCanExecuteHandler, and RemoveCanExecuteHandler" />
<MemberSignature Language="DocId" Value="E:System.Windows.Input.CommandManager.CanExecute" />
<MemberSignature Language="VB.NET" Value="see AddCanExecuteHandler, and RemoveCanExecuteHandler" />
<MemberSignature Language="F#" Value="see AddCanExecuteHandler, and RemoveCanExecuteHandler" Usage="see AddCanExecuteHandler, and RemoveCanExecuteHandler" />
<MemberType>AttachedEvent</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Occurs when the <see cref="M:System.Windows.Input.RoutedCommand.CanExecute(System.Object,System.Windows.IInputElement)" /> method on the <see cref="T:System.Windows.Input.RoutedCommand" /> is called and the <see cref="E:System.Windows.Input.CommandManager.PreviewCanExecute" /> event was not handled.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<a name="routedEventInfo_CanExecute"></a>
## Routed Event Information
| Item | Value |
|------------------|----------------------------------------------------------|
|Identifier field|<xref:System.Windows.Input.CommandManager.CanExecuteEvent>|
|Routing strategy|Bubbling|
|Delegate|<xref:System.Windows.Input.CanExecuteRoutedEventHandler>|
]]></format>
</remarks>
<altmember cref="E:System.Windows.Input.CommandManager.PreviewCanExecute" />
</Docs>
</Member>
<Member MemberName="CanExecuteEvent">
<MemberSignature Language="C#" Value="public static readonly System.Windows.RoutedEvent CanExecuteEvent;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.RoutedEvent CanExecuteEvent" />
<MemberSignature Language="DocId" Value="F:System.Windows.Input.CommandManager.CanExecuteEvent" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly CanExecuteEvent As RoutedEvent " />
<MemberSignature Language="F#" Value=" staticval mutable CanExecuteEvent : System.Windows.RoutedEvent" Usage="System.Windows.Input.CommandManager.CanExecuteEvent" />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ CanExecuteEvent;" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.RoutedEvent</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="E:System.Windows.Input.CommandManager.CanExecute" /> attached event.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Executed">
<MemberSignature Language="C#" Value="see AddExecutedHandler, and RemoveExecutedHandler" />
<MemberSignature Language="ILAsm" Value="see AddExecutedHandler, and RemoveExecutedHandler" />
<MemberSignature Language="DocId" Value="E:System.Windows.Input.CommandManager.Executed" />
<MemberSignature Language="VB.NET" Value="see AddExecutedHandler, and RemoveExecutedHandler" />
<MemberSignature Language="F#" Value="see AddExecutedHandler, and RemoveExecutedHandler" Usage="see AddExecutedHandler, and RemoveExecutedHandler" />
<MemberType>AttachedEvent</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Occurs when the <see cref="M:System.Windows.Input.RoutedCommand.Execute(System.Object,System.Windows.IInputElement)" /> method on the <see cref="T:System.Windows.Input.RoutedCommand" /> is called and the <see cref="E:System.Windows.Input.CommandManager.PreviewExecuted" /> event was not handled.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<a name="routedEventInfo_Executed"></a>
## Routed Event Information
| Item | Value |
|------------------|----------------------------------------------------------|
|Identifier field|<xref:System.Windows.Input.CommandManager.ExecutedEvent>|
|Routing strategy|Bubbling|
|Delegate|<xref:System.Windows.Input.ExecutedRoutedEventHandler>|
]]></format>
</remarks>
<altmember cref="E:System.Windows.Input.CommandManager.PreviewExecuted" />
</Docs>
</Member>
<Member MemberName="ExecutedEvent">
<MemberSignature Language="C#" Value="public static readonly System.Windows.RoutedEvent ExecutedEvent;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.RoutedEvent ExecutedEvent" />
<MemberSignature Language="DocId" Value="F:System.Windows.Input.CommandManager.ExecutedEvent" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly ExecutedEvent As RoutedEvent " />
<MemberSignature Language="F#" Value=" staticval mutable ExecutedEvent : System.Windows.RoutedEvent" Usage="System.Windows.Input.CommandManager.ExecutedEvent" />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ ExecutedEvent;" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.RoutedEvent</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="E:System.Windows.Input.CommandManager.Executed" /> attached event.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="InvalidateRequerySuggested">
<MemberSignature Language="C#" Value="public static void InvalidateRequerySuggested ();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void InvalidateRequerySuggested() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.InvalidateRequerySuggested" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub InvalidateRequerySuggested ()" />
<MemberSignature Language="F#" Value="static member InvalidateRequerySuggested : unit -> unit" Usage="System.Windows.Input.CommandManager.InvalidateRequerySuggested " />
<MemberSignature Language="C++ CLI" Value="public:
 static void InvalidateRequerySuggested();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Forces the <see cref="T:System.Windows.Input.CommandManager" /> to raise the <see cref="E:System.Windows.Input.CommandManager.RequerySuggested" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Input.CommandManager> only pays attention to certain conditions in determining when the command target has changed, such as change in keyboard focus. In situations where the <xref:System.Windows.Input.CommandManager> does not sufficiently determine a change in conditions that cause a command to not be able to execute, <xref:System.Windows.Input.CommandManager.InvalidateRequerySuggested%2A> can be called to force the <xref:System.Windows.Input.CommandManager> to raise the <xref:System.Windows.Input.CommandManager.RequerySuggested> event.
## Examples
The following example uses a <xref:System.Windows.Threading.DispatcherTimer> to periodically call <xref:System.Windows.Input.CommandManager.InvalidateRequerySuggested%2A> to force the <xref:System.Windows.Input.CommandManager> to raise the <xref:System.Windows.Input.CommandManager.RequerySuggested> event.
:::code language="csharp" source="~/snippets/csharp/System.Windows.Input/CanExecuteRoutedEventArgs/Parameter/Window1.xaml.cs" id="Snippetinvalidatesampledispatchertimer":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/InvalidateRequeryWithDispatcherTimer/visualbasic/window1.xaml.vb" id="Snippetinvalidatesampledispatchertimer":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="PreviewCanExecute">
<MemberSignature Language="C#" Value="see AddPreviewCanExecuteHandler, and RemovePreviewCanExecuteHandler" />
<MemberSignature Language="ILAsm" Value="see AddPreviewCanExecuteHandler, and RemovePreviewCanExecuteHandler" />
<MemberSignature Language="DocId" Value="E:System.Windows.Input.CommandManager.PreviewCanExecute" />
<MemberSignature Language="VB.NET" Value="see AddPreviewCanExecuteHandler, and RemovePreviewCanExecuteHandler" />
<MemberSignature Language="F#" Value="see AddPreviewCanExecuteHandler, and RemovePreviewCanExecuteHandler" Usage="see AddPreviewCanExecuteHandler, and RemovePreviewCanExecuteHandler" />
<MemberType>AttachedEvent</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Occurs when the <see cref="M:System.Windows.Input.RoutedCommand.CanExecute(System.Object,System.Windows.IInputElement)" /> method on the <see cref="T:System.Windows.Input.RoutedCommand" /> is called.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<a name="routedEventInfo_PreviewCanExecute"></a>
## Routed Event Information
| Item | Value |
|------------------|----------------------------------------------------------|
|Identifier field|<xref:System.Windows.Input.CommandManager.PreviewCanExecuteEvent>|
|Routing strategy|Tunneling|
|Delegate|<xref:System.Windows.Input.CanExecuteRoutedEventHandler>|
]]></format>
</remarks>
<altmember cref="E:System.Windows.Input.CommandManager.CanExecute" />
</Docs>
</Member>
<Member MemberName="PreviewCanExecuteEvent">
<MemberSignature Language="C#" Value="public static readonly System.Windows.RoutedEvent PreviewCanExecuteEvent;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.RoutedEvent PreviewCanExecuteEvent" />
<MemberSignature Language="DocId" Value="F:System.Windows.Input.CommandManager.PreviewCanExecuteEvent" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly PreviewCanExecuteEvent As RoutedEvent " />
<MemberSignature Language="F#" Value=" staticval mutable PreviewCanExecuteEvent : System.Windows.RoutedEvent" Usage="System.Windows.Input.CommandManager.PreviewCanExecuteEvent" />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ PreviewCanExecuteEvent;" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.RoutedEvent</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="E:System.Windows.Input.CommandManager.PreviewCanExecute" /> attached event.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="PreviewExecuted">
<MemberSignature Language="C#" Value="see AddPreviewExecutedHandler, and RemovePreviewExecutedHandler" />
<MemberSignature Language="ILAsm" Value="see AddPreviewExecutedHandler, and RemovePreviewExecutedHandler" />
<MemberSignature Language="DocId" Value="E:System.Windows.Input.CommandManager.PreviewExecuted" />
<MemberSignature Language="VB.NET" Value="see AddPreviewExecutedHandler, and RemovePreviewExecutedHandler" />
<MemberSignature Language="F#" Value="see AddPreviewExecutedHandler, and RemovePreviewExecutedHandler" Usage="see AddPreviewExecutedHandler, and RemovePreviewExecutedHandler" />
<MemberType>AttachedEvent</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Occurs when the <see cref="M:System.Windows.Input.RoutedCommand.Execute(System.Object,System.Windows.IInputElement)" /> method on the <see cref="T:System.Windows.Input.RoutedCommand" /> is called.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<a name="routedEventInfo_PreviewExecuted"></a>
## Routed Event Information
| Item | Value |
|------------------|----------------------------------------------------------|
|Identifier field|<xref:System.Windows.Input.CommandManager.PreviewExecutedEvent>|
|Routing strategy|Tunneling|
|Delegate|<xref:System.Windows.Input.ExecutedRoutedEventHandler>|
]]></format>
</remarks>
<altmember cref="E:System.Windows.Input.CommandManager.Executed" />
</Docs>
</Member>
<Member MemberName="PreviewExecutedEvent">
<MemberSignature Language="C#" Value="public static readonly System.Windows.RoutedEvent PreviewExecutedEvent;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.RoutedEvent PreviewExecutedEvent" />
<MemberSignature Language="DocId" Value="F:System.Windows.Input.CommandManager.PreviewExecutedEvent" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly PreviewExecutedEvent As RoutedEvent " />
<MemberSignature Language="F#" Value=" staticval mutable PreviewExecutedEvent : System.Windows.RoutedEvent" Usage="System.Windows.Input.CommandManager.PreviewExecutedEvent" />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ PreviewExecutedEvent;" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.RoutedEvent</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="E:System.Windows.Input.CommandManager.PreviewExecuted" /> attached event.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RegisterClassCommandBinding">
<MemberSignature Language="C#" Value="public static void RegisterClassCommandBinding (Type type, System.Windows.Input.CommandBinding commandBinding);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void RegisterClassCommandBinding(class System.Type type, class System.Windows.Input.CommandBinding commandBinding) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.RegisterClassCommandBinding(System.Type,System.Windows.Input.CommandBinding)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub RegisterClassCommandBinding (type As Type, commandBinding As CommandBinding)" />
<MemberSignature Language="F#" Value="static member RegisterClassCommandBinding : Type * System.Windows.Input.CommandBinding -> unit" Usage="System.Windows.Input.CommandManager.RegisterClassCommandBinding (type, commandBinding)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void RegisterClassCommandBinding(Type ^ type, System::Windows::Input::CommandBinding ^ commandBinding);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="type" Type="System.Type" />
<Parameter Name="commandBinding" Type="System.Windows.Input.CommandBinding" />
</Parameters>
<Docs>
<param name="type">The class with which to register <paramref name="commandBinding" />.</param>
<param name="commandBinding">The command binding to register.</param>
<summary>Registers a <see cref="T:System.Windows.Input.CommandBinding" /> with the specified type.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method enables a <xref:System.Windows.Input.CommandBinding> to be associated with a class instead than an instance of a class.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="type" /> or <paramref name="commandBinding" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="RegisterClassInputBinding">
<MemberSignature Language="C#" Value="public static void RegisterClassInputBinding (Type type, System.Windows.Input.InputBinding inputBinding);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void RegisterClassInputBinding(class System.Type type, class System.Windows.Input.InputBinding inputBinding) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.RegisterClassInputBinding(System.Type,System.Windows.Input.InputBinding)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub RegisterClassInputBinding (type As Type, inputBinding As InputBinding)" />
<MemberSignature Language="F#" Value="static member RegisterClassInputBinding : Type * System.Windows.Input.InputBinding -> unit" Usage="System.Windows.Input.CommandManager.RegisterClassInputBinding (type, inputBinding)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void RegisterClassInputBinding(Type ^ type, System::Windows::Input::InputBinding ^ inputBinding);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="type" Type="System.Type" />
<Parameter Name="inputBinding" Type="System.Windows.Input.InputBinding" />
</Parameters>
<Docs>
<param name="type">The type to register <paramref name="inputBinding" /> with.</param>
<param name="inputBinding">The input binding to register.</param>
<summary>Registers the specified <see cref="T:System.Windows.Input.InputBinding" /> with the specified type.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method enables an <xref:System.Windows.Input.InputBinding> to be associated with a type instead of an instance of a class.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="type" /> or <paramref name="inputBinding" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="RemoveCanExecuteHandler">
<MemberSignature Language="C#" Value="public static void RemoveCanExecuteHandler (System.Windows.UIElement element, System.Windows.Input.CanExecuteRoutedEventHandler handler);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void RemoveCanExecuteHandler(class System.Windows.UIElement element, class System.Windows.Input.CanExecuteRoutedEventHandler handler) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.RemoveCanExecuteHandler(System.Windows.UIElement,System.Windows.Input.CanExecuteRoutedEventHandler)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub RemoveCanExecuteHandler (element As UIElement, handler As CanExecuteRoutedEventHandler)" />
<MemberSignature Language="F#" Value="static member RemoveCanExecuteHandler : System.Windows.UIElement * System.Windows.Input.CanExecuteRoutedEventHandler -> unit" Usage="System.Windows.Input.CommandManager.RemoveCanExecuteHandler (element, handler)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void RemoveCanExecuteHandler(System::Windows::UIElement ^ element, System::Windows::Input::CanExecuteRoutedEventHandler ^ handler);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
<Parameter Name="handler" Type="System.Windows.Input.CanExecuteRoutedEventHandler" />
</Parameters>
<Docs>
<param name="element">The element to remove <paramref name="handler" /> from.</param>
<param name="handler">The can execute handler.</param>
<summary>Detaches the specified <see cref="T:System.Windows.Input.CanExecuteRoutedEventHandler" /> from the specified element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example detaches a <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and an <xref:System.Windows.Input.ExecutedRoutedEventHandler> which had previously been attached to a <xref:System.Windows.Controls.Button>.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagerremovehandlers":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagerremovehandlers":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="element" /> or <paramref name="handler" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Windows.Input.RoutedCommand" />
<altmember cref="T:System.Windows.Input.ICommand" />
</Docs>
</Member>
<Member MemberName="RemoveExecutedHandler">
<MemberSignature Language="C#" Value="public static void RemoveExecutedHandler (System.Windows.UIElement element, System.Windows.Input.ExecutedRoutedEventHandler handler);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void RemoveExecutedHandler(class System.Windows.UIElement element, class System.Windows.Input.ExecutedRoutedEventHandler handler) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.RemoveExecutedHandler(System.Windows.UIElement,System.Windows.Input.ExecutedRoutedEventHandler)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub RemoveExecutedHandler (element As UIElement, handler As ExecutedRoutedEventHandler)" />
<MemberSignature Language="F#" Value="static member RemoveExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -> unit" Usage="System.Windows.Input.CommandManager.RemoveExecutedHandler (element, handler)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void RemoveExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
<Parameter Name="handler" Type="System.Windows.Input.ExecutedRoutedEventHandler" />
</Parameters>
<Docs>
<param name="element">The element to remove <paramref name="handler" /> from.</param>
<param name="handler">The executed handler.</param>
<summary>Detaches the specified <see cref="T:System.Windows.Input.ExecutedRoutedEventHandler" /> from the specified element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example detaches a <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and an <xref:System.Windows.Input.ExecutedRoutedEventHandler> which had previously been attached to a <xref:System.Windows.Controls.Button>.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagerremovehandlers":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagerremovehandlers":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="element" /> or <paramref name="handler" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Windows.Input.RoutedCommand" />
<altmember cref="T:System.Windows.Input.ICommand" />
</Docs>
</Member>
<Member MemberName="RemovePreviewCanExecuteHandler">
<MemberSignature Language="C#" Value="public static void RemovePreviewCanExecuteHandler (System.Windows.UIElement element, System.Windows.Input.CanExecuteRoutedEventHandler handler);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void RemovePreviewCanExecuteHandler(class System.Windows.UIElement element, class System.Windows.Input.CanExecuteRoutedEventHandler handler) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.RemovePreviewCanExecuteHandler(System.Windows.UIElement,System.Windows.Input.CanExecuteRoutedEventHandler)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub RemovePreviewCanExecuteHandler (element As UIElement, handler As CanExecuteRoutedEventHandler)" />
<MemberSignature Language="F#" Value="static member RemovePreviewCanExecuteHandler : System.Windows.UIElement * System.Windows.Input.CanExecuteRoutedEventHandler -> unit" Usage="System.Windows.Input.CommandManager.RemovePreviewCanExecuteHandler (element, handler)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void RemovePreviewCanExecuteHandler(System::Windows::UIElement ^ element, System::Windows::Input::CanExecuteRoutedEventHandler ^ handler);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
<Parameter Name="handler" Type="System.Windows.Input.CanExecuteRoutedEventHandler" />
</Parameters>
<Docs>
<param name="element">The element to remove <paramref name="handler" /> from.</param>
<param name="handler">The can execute handler.</param>
<summary>Detaches the specified <see cref="T:System.Windows.Input.CanExecuteRoutedEventHandler" /> from the specified element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example detaches a <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and an <xref:System.Windows.Input.ExecutedRoutedEventHandler> which had previously been attached to a <xref:System.Windows.Controls.Button>.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagerremovehandlers":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagerremovehandlers":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="element" /> or <paramref name="handler" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Windows.Input.RoutedCommand" />
<altmember cref="T:System.Windows.Input.ICommand" />
</Docs>
</Member>
<Member MemberName="RemovePreviewExecutedHandler">
<MemberSignature Language="C#" Value="public static void RemovePreviewExecutedHandler (System.Windows.UIElement element, System.Windows.Input.ExecutedRoutedEventHandler handler);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void RemovePreviewExecutedHandler(class System.Windows.UIElement element, class System.Windows.Input.ExecutedRoutedEventHandler handler) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Input.CommandManager.RemovePreviewExecutedHandler(System.Windows.UIElement,System.Windows.Input.ExecutedRoutedEventHandler)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub RemovePreviewExecutedHandler (element As UIElement, handler As ExecutedRoutedEventHandler)" />
<MemberSignature Language="F#" Value="static member RemovePreviewExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -> unit" Usage="System.Windows.Input.CommandManager.RemovePreviewExecutedHandler (element, handler)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void RemovePreviewExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
<Parameter Name="handler" Type="System.Windows.Input.ExecutedRoutedEventHandler" />
</Parameters>
<Docs>
<param name="element">The element to remove <paramref name="handler" /> from.</param>
<param name="handler">The executed handler.</param>
<summary>Detaches the specified <see cref="T:System.Windows.Input.ExecutedRoutedEventHandler" /> from the specified element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example detaches a <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and an <xref:System.Windows.Input.ExecutedRoutedEventHandler> which had previously been attached to a <xref:System.Windows.Controls.Button>.
:::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/InputBindings/Window1.xaml.cs" id="Snippetcommandingoverviewcmdmanagerremovehandlers":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb" id="Snippetcommandingoverviewcmdmanagerremovehandlers":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="element" /> or <paramref name="handler" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Windows.Input.RoutedCommand" />
<altmember cref="T:System.Windows.Input.ICommand" />
</Docs>
</Member>
<Member MemberName="RequerySuggested">
<MemberSignature Language="C#" Value="public static event EventHandler RequerySuggested;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler RequerySuggested" />
<MemberSignature Language="DocId" Value="E:System.Windows.Input.CommandManager.RequerySuggested" />
<MemberSignature Language="VB.NET" Value="Public Shared Custom Event RequerySuggested As EventHandler " />
<MemberSignature Language="F#" Value="member this.RequerySuggested : EventHandler " Usage="member this.RequerySuggested : System.EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:
 static event EventHandler ^ RequerySuggested;" />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="T:System.Windows.Input.CommandManager" /> detects conditions that might change the ability of a command to execute.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This event holds onto the handler as a weak reference. Objects that listen for this event should keep a strong reference to their event handler to avoid it being garbage collected. This can be accomplished by having a private field and assigning the handler as the value before or after attaching to this event.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>