Ce sujet n'a pas encore été évalué - Évaluez ce sujet

ButtonBase.CommandParameter, propriété

Gets or sets the parameter to pass to the Command property.

Espace de noms: System.Windows.Controls.Primitives
Assembly : PresentationFramework (dans presentationframework.dll)
Espace de noms XML :  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)] 
[BindableAttribute(true)] 
public Object CommandParameter { get; set; }
/** @property */
public final Object get_CommandParameter ()

/** @property */
public void set_CommandParameter (Object value)

public final function get CommandParameter () : Object

public function set CommandParameter (value : Object)

<object>
  <object.CommandParameter>
    <Object .../>
  </object.CommandParameter>
</object>
<object CommandParameter="commandParameter" />

Valeur de la propriété

Parameter to pass to the Command property.

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).

Microsoft .NET Framework 3.0 est pris en charge sur Windows Vista, Microsoft Windows XP SP2 et Windows Server 2003 SP1.

.NET Framework

Prise en charge dans : 3.0
Cela vous a-t-il été utile ?
(1500 caractères restants)

Ajouts de la communauté

AJOUTER
© 2013 Microsoft. Tous droits réservés.