none
Pass a control [combobox / gridview] as a command parameter

    Question

  • Hi,

    Can someone please tell me how to pass a control as a command parameter. Please have a look at the syntax below.

    <Button Command="{Binding MyCommand}"
     CommandParameter="{Binding ElementName=AnotherElement, Path=Myattribute}"/>
    

    The syntax above would get me the "Myattribute" of the "AnotherElement" what if i want to pass the entire control itself. e.g not the selected item of a combobox but the combobox itself.

    thanx

    Asela

    Wednesday, January 12, 2011 10:41 PM

Answers

All replies