title: Passing two command parameters using a WPF binding
body: <p>I have a command which I am executing from my XAML file using the following standard syntax:</p>
  
  <pre><code>&lt;Button Content="Zoom" Command="{Binding MyViewModel.ZoomCommand}"/&gt;
  </code></pre>
  
  <p>This worked fine until I realized that I needed TWO pieces of information from the view in order to make this operation complete the way users expect (the width and height of the canvas specfically).</p>
  
  <p>It seems like it's possible to pass an array as an argument to my command, but I don't see there being a way to specify the binding to my two canvas properties in the CommandParameter:</p>
  
  <pre><code>&lt;Button Content="Zoom" 
          Command="{Binding MyViewModel.ZoomCommand" 
          CommandParameter="{Binding ElementName=MyCanvas, Path=Width}"/&gt;
  </code></pre>
  
  <p>How do I pass both Width and Height to my command?  It doesn't seem like this is possible using commands from XAML and I need to wire up a click handler in my codebehind to get this information to pass to my zoom method.</p>