Permalink
Fetching contributors…
Cannot retrieve contributors at this time
775 lines (694 sloc) 55.4 KB
<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="C++ CLI" Value="public ref class CommandManager sealed" />
<TypeSignature Language="F#" Value="type CommandManager = class" />
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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](~/docs/framework/wpf/advanced/commanding-overview.md).
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="C++ CLI" Value="public:&#xA; static void AddCanExecuteHandler(System::Windows::UIElement ^ element, System::Windows::Input::CanExecuteRoutedEventHandler ^ handler);" />
<MemberSignature Language="F#" Value="static member AddCanExecuteHandler : System.Windows.UIElement * System.Windows.Input.CanExecuteRoutedEventHandler -&gt; unit" Usage="System.Windows.Input.CommandManager.AddCanExecuteHandler (element, handler)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>handler</c> 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-xaml[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlersXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml#commandingoverviewcmdmanageraddhandlersxaml)]
Next, the <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and the <xref:System.Windows.Input.ExecutedRoutedEventHandler> are created.
[!code-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerExecutedHandler](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagerexecutedhandler)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerExecutedHandler](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagerexecutedhandler)]
[!code-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerCanExecuteHandler](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagercanexecutehandler)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerCanExecuteHandler](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagercanexecutehandler)]
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-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlers](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanageraddhandlers)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlers](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanageraddhandlers)]
]]></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="C++ CLI" Value="public:&#xA; static void AddExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);" />
<MemberSignature Language="F#" Value="static member AddExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -&gt; unit" Usage="System.Windows.Input.CommandManager.AddExecutedHandler (element, handler)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>handler</c> 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-xaml[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlersXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml#commandingoverviewcmdmanageraddhandlersxaml)]
Next, the <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and the <xref:System.Windows.Input.ExecutedRoutedEventHandler> are created.
[!code-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerExecutedHandler](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagerexecutedhandler)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerExecutedHandler](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagerexecutedhandler)]
[!code-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerCanExecuteHandler](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagercanexecutehandler)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerCanExecuteHandler](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagercanexecutehandler)]
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-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlers](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanageraddhandlers)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlers](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanageraddhandlers)]
]]></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="C++ CLI" Value="public:&#xA; static void AddPreviewCanExecuteHandler(System::Windows::UIElement ^ element, System::Windows::Input::CanExecuteRoutedEventHandler ^ handler);" />
<MemberSignature Language="F#" Value="static member AddPreviewCanExecuteHandler : System.Windows.UIElement * System.Windows.Input.CanExecuteRoutedEventHandler -&gt; unit" Usage="System.Windows.Input.CommandManager.AddPreviewCanExecuteHandler (element, handler)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>handler</c> 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-xaml[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlersXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml#commandingoverviewcmdmanageraddhandlersxaml)]
Next, the <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and the <xref:System.Windows.Input.ExecutedRoutedEventHandler> are created.
[!code-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerExecutedHandler](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagerexecutedhandler)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerExecutedHandler](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagerexecutedhandler)]
[!code-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerCanExecuteHandler](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagercanexecutehandler)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerCanExecuteHandler](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagercanexecutehandler)]
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-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlers](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanageraddhandlers)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlers](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanageraddhandlers)]
]]></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="C++ CLI" Value="public:&#xA; static void AddPreviewExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);" />
<MemberSignature Language="F#" Value="static member AddPreviewExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -&gt; unit" Usage="System.Windows.Input.CommandManager.AddPreviewExecutedHandler (element, handler)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>handler</c> 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-xaml[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlersXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml#commandingoverviewcmdmanageraddhandlersxaml)]
Next, the <xref:System.Windows.Input.CanExecuteRoutedEventHandler> and the <xref:System.Windows.Input.ExecutedRoutedEventHandler> are created.
[!code-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerExecutedHandler](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagerexecutedhandler)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerExecutedHandler](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagerexecutedhandler)]
[!code-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerCanExecuteHandler](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagercanexecutehandler)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerCanExecuteHandler](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagercanexecutehandler)]
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-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlers](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanageraddhandlers)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerAddHandlers](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanageraddhandlers)]
]]></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>
</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
|||
|-|-|
|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="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ CanExecuteEvent;" />
<MemberSignature Language="F#" Value=" staticval mutable CanExecuteEvent : System.Windows.RoutedEvent" Usage="System.Windows.Input.CommandManager.CanExecuteEvent" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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>
</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
|||
|-|-|
|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="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ ExecutedEvent;" />
<MemberSignature Language="F#" Value=" staticval mutable ExecutedEvent : System.Windows.RoutedEvent" Usage="System.Windows.Input.CommandManager.ExecutedEvent" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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="C++ CLI" Value="public:&#xA; static void InvalidateRequerySuggested();" />
<MemberSignature Language="F#" Value="static member InvalidateRequerySuggested : unit -&gt; unit" Usage="System.Windows.Input.CommandManager.InvalidateRequerySuggested " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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-csharp[InvalidateRequeryWithDispatcherTimer#InvalidateSampleDispatcherTimer](~/samples/snippets/csharp/VS_Snippets_Wpf/InvalidateRequeryWithDispatcherTimer/CSharp/Window1.xaml.cs#invalidatesampledispatchertimer)]
[!code-vb[InvalidateRequeryWithDispatcherTimer#InvalidateSampleDispatcherTimer](~/samples/snippets/visualbasic/VS_Snippets_Wpf/InvalidateRequeryWithDispatcherTimer/visualbasic/window1.xaml.vb#invalidatesampledispatchertimer)]
]]></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>
</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
|||
|-|-|
|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="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ PreviewCanExecuteEvent;" />
<MemberSignature Language="F#" Value=" staticval mutable PreviewCanExecuteEvent : System.Windows.RoutedEvent" Usage="System.Windows.Input.CommandManager.PreviewCanExecuteEvent" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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>
</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
|||
|-|-|
|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="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ PreviewExecutedEvent;" />
<MemberSignature Language="F#" Value=" staticval mutable PreviewExecutedEvent : System.Windows.RoutedEvent" Usage="System.Windows.Input.CommandManager.PreviewExecutedEvent" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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="C++ CLI" Value="public:&#xA; static void RegisterClassCommandBinding(Type ^ type, System::Windows::Input::CommandBinding ^ commandBinding);" />
<MemberSignature Language="F#" Value="static member RegisterClassCommandBinding : Type * System.Windows.Input.CommandBinding -&gt; unit" Usage="System.Windows.Input.CommandManager.RegisterClassCommandBinding (type, commandBinding)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>commandBinding</c>.</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="C++ CLI" Value="public:&#xA; static void RegisterClassInputBinding(Type ^ type, System::Windows::Input::InputBinding ^ inputBinding);" />
<MemberSignature Language="F#" Value="static member RegisterClassInputBinding : Type * System.Windows.Input.InputBinding -&gt; unit" Usage="System.Windows.Input.CommandManager.RegisterClassInputBinding (type, inputBinding)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>inputBinding</c> 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="C++ CLI" Value="public:&#xA; static void RemoveCanExecuteHandler(System::Windows::UIElement ^ element, System::Windows::Input::CanExecuteRoutedEventHandler ^ handler);" />
<MemberSignature Language="F#" Value="static member RemoveCanExecuteHandler : System.Windows.UIElement * System.Windows.Input.CanExecuteRoutedEventHandler -&gt; unit" Usage="System.Windows.Input.CommandManager.RemoveCanExecuteHandler (element, handler)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>handler</c> 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-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerRemoveHandlers](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagerremovehandlers)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerRemoveHandlers](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagerremovehandlers)]
]]></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="C++ CLI" Value="public:&#xA; static void RemoveExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);" />
<MemberSignature Language="F#" Value="static member RemoveExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -&gt; unit" Usage="System.Windows.Input.CommandManager.RemoveExecutedHandler (element, handler)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>handler</c> 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-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerRemoveHandlers](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagerremovehandlers)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerRemoveHandlers](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagerremovehandlers)]
]]></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="C++ CLI" Value="public:&#xA; static void RemovePreviewCanExecuteHandler(System::Windows::UIElement ^ element, System::Windows::Input::CanExecuteRoutedEventHandler ^ handler);" />
<MemberSignature Language="F#" Value="static member RemovePreviewCanExecuteHandler : System.Windows.UIElement * System.Windows.Input.CanExecuteRoutedEventHandler -&gt; unit" Usage="System.Windows.Input.CommandManager.RemovePreviewCanExecuteHandler (element, handler)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>handler</c> 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-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerRemoveHandlers](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagerremovehandlers)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerRemoveHandlers](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagerremovehandlers)]
]]></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="C++ CLI" Value="public:&#xA; static void RemovePreviewExecutedHandler(System::Windows::UIElement ^ element, System::Windows::Input::ExecutedRoutedEventHandler ^ handler);" />
<MemberSignature Language="F#" Value="static member RemovePreviewExecutedHandler : System.Windows.UIElement * System.Windows.Input.ExecutedRoutedEventHandler -&gt; unit" Usage="System.Windows.Input.CommandManager.RemovePreviewExecutedHandler (element, handler)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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 <c>handler</c> 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-csharp[commandingoverviewsnippets#CommandingOverviewCmdManagerRemoveHandlers](~/samples/snippets/csharp/VS_Snippets_Wpf/CommandingOverviewSnippets/CSharp/Window1.xaml.cs#commandingoverviewcmdmanagerremovehandlers)]
[!code-vb[commandingoverviewsnippets#CommandingOverviewCmdManagerRemoveHandlers](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CommandingOverviewSnippets/visualbasic/window1.xaml.vb#commandingoverviewcmdmanagerremovehandlers)]
]]></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="C++ CLI" Value="public:&#xA; static event EventHandler ^ RequerySuggested;" />
<MemberSignature Language="F#" Value="member this.RequerySuggested : EventHandler " Usage="member this.RequerySuggested : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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>