4

how to Pass multiple parameters via Command Parameter in WPF?? Do we have to create an object and pass if so can someone help me with an example

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
Sumeru Suresh
  • 3,121
  • 5
  • 28
  • 31

2 Answers2

4

Maybe you can use MultiBinding with a converter that will create an object for you...

Captain
  • 713
  • 1
  • 7
  • 20
-2

I'm guessing it would be sufficient to pass the underlying data context to the command? This means you can use sender's DataContext in the command's Executed handler, or set CommandParameter={Binding} in xaml.

If you see that you can't bind CommandParameter to a single object - this might be because of a bad design.

arconaut
  • 3,227
  • 2
  • 27
  • 36