The xaml code below :
<ScrollViewer x:Name="scroll" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
<layout:LayoutTransformer x:Name="layout" Background="{x:Null}" >
<layout:LayoutTransformer.LayoutTransform>
<ScaleTransform x:Name="contentScale" ScaleX="1.0" ScaleY="1.0" />
</layout:LayoutTransformer.LayoutTransform>
<Image x:Name="img" Source="../pin.PNG" >
</Image>
</layout:LayoutTransformer>
</ScrollViewer>
And on the slidervaluechangedevent :
this.contentScale.ScaleX = this.contentScale.ScaleY = e.NewValue;
this.layout.ApplyLayoutTransform();
LayoutTransformer is ther in toolkit, add its reference:
System.Windows.Controls.Layout.Toolkit
Without having a toolkit, u can do it but it doesn't work properly(it will never update the scrollviewer)...try it the below one :
<ScrollViewer x:Name="scroll" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Themes:ThemeManager.StyleKey="TreeScrollViewer">
<Image x:Name="img" Source="../charge_chargeline.PNG" >
<Image.RenderTransform>
<ScaleTransform x:Name="contentScale" ScaleX="1.0" ScaleY="1.0" />
</Image.RenderTransform>
</Image>
</ScrollViewer>
And on the slidervaluechangedevent :
`this.contentScale.ScaleX = this.contentScale.ScaleY = e.NewValue`;
Hope it helps :)....