Gets or sets the parameter to pass to the Command property. This is a dependency property.
<LocalizabilityAttribute(LocalizationCategory.NeverLocalize)> _ <BindableAttribute(True)> _ Public Property CommandParameter As Object
Dim instance As ButtonBase Dim value As Object value = instance.CommandParameter instance.CommandParameter = value
[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)] [BindableAttribute(true)] public Object CommandParameter { get; set; }
[LocalizabilityAttribute(LocalizationCategory::NeverLocalize)] [BindableAttribute(true)] public: virtual property Object^ CommandParameter { Object^ get () sealed; void set (Object^ value) sealed; }
public final function get CommandParameter () : Object public final function set CommandParameter (value : Object)
<object> <object.CommandParameter> <Object .../> </object.CommandParameter> </object>
<object CommandParameter="commandParameter" />
A value of the same type as the particular command specified in the Command property expects. If you use an existing command library command, see that command library's documentation for XAML usage information, including which type of CommandParameter the command expects. If you use a custom command, see Remarks.
Identifier field
CommandParameterProperty
Metadata properties set to true
None
Most existing commands from the command libraries do not use a command parameter. Of the commands that do use a command parameter, most of these take a parameter with some primitive type value, such as an integer or a string. However, it is possible to create a custom command where that command expects a nonprimitive type as its command parameter. For a custom command case like this, setting CommandParameter in code might require a new or existing object instance. Setting CommandParameter in markup might require property element syntax, where the object element filling the property element syntax is a new element of the type expected by that command. Alternatively, setting in markup might require a reference through a markup extension to an existing object (typically these references are made with Binding Markup Extension or StaticResource Markup Extension).
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003