Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
<object> <object.CommandBindings> oneOrMoreCommandBindings </object.CommandBindings> </object>
Another typical way to populate the collection is to use CommandManager methods programmatically.
The following example adds a CommandBinding to a window using markup. Note that in XAML, the CommandBindingCollection is not declared in the markup as an element; the collection object is inferred by the type that the property takes, and you populate the property element with one or more CommandBinding elements:
For more information about the XAML syntax for collections, see XAML Syntax In Detail.
The following example does essentially the same thing in code:
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.