I have a command which I am executing from my XAML file using the following standard syntax:
<Button Content="Zoom" Command="{Binding MyViewModel.ZoomCommand}"/>
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).
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:
<Button Content="Zoom" Command="{Binding MyViewModel.ZoomCommand" CommandParameter={Binding ElementName=MyCanvas, Path=Width}"/>
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.