I’m trying to make an image zoomable in my windows phone 7 application. (code below) however it dosent work, the image dosent display. Can someone put me on the right track, is this the right control to use? If it is then what am I doing wrong?
<controls:PivotItem Name="Header" Header="item1">
<Grid>
<MultiScaleImage Name="mainImage" />
</Grid>
</controls:PivotItem>
var imageurl = loginxml.Descendants("response").Elements("submissions").Elements("submission").Elements("file_url_screen").First().Value;
//imageurl = https://inkbunny.net///files/screen/165/165693_CobaltHusky_random_anatomy_doodles.png
Header.Header = loginxml.Descendants("response").Elements("submissions").Elements("submission").Elements("title").First().Value;
DeepZoomImageTileSource img = new DeepZoomImageTileSource(new Uri(imageurl));
mainImage.Source = img;
EDIT Reading the msdn on MultiScaleImage that isnt the control to use. It needs a specific image source (not a bitmap/jpg)
The URL for the DeepZoomImageTileSource is not an image url, but the url to a XML file listing the images to use for the deep zoom tiles.
I implemented a simple zoomable image as follows using the silverlight toolkit:
and in code:
Then declare two variables for your angle and zoom:
And then handle the gesture events:
Uncomment the rotation line if you want to handle rotating the image as well.
Sam