I have a scrollviewer around a canvas object
<ScrollViewer>
<Canvas x:Name="myCanvas"/>
</ScrollViewer>
and I'm adding (lots of) inherited custom controls into the Canvas in the code allowing me to basically create an interactive diagram:
var myControl = new MyControl();
myControl.Height = 10;
myControl.Width = 20;
Canvas.SetLeft(myControl,5);
Canvas.SetTop(myControl,20);
this.myCanvas.Children.Add(myControl);
The ScrollViewer allows me to pan and pinch zoom around this canvas of controls keeping the same aspect ratio quite nicely.
Is there any way to easily implement stretching using pinching i.e. zooming without maintaining aspect ratio?