DeepzoomYesSilverlightIs also addedWindows Phone 7. This function should be regardedPhone7 UIThe main functions. BecausePhone7A lotUIYesDeepzoomDeveloped. In additionMix10The cartoon reading software exhibited at the conference was also developedDeepzoomDeveloped, this function can also be seen inPhone7.
I.To developDeepzoomFirst, you mustDeepzoom composerInExpressionTo generateDeepzoomGallery.
Ii. NewWindows Phone application, InXAMLAdd the following statement to the design window:
< Multiscaleimage X : Name = "Msi" Width = "486" Height = "652" Verticalalignment= "TOP"Horizontalalignment= "Left"Margin= "-6, 0, 0"/>
InPhone7OnlyMultiscaleimageTo displayDeepzoomGallery.
III.SetDeepzoom composerThe generated gallery is added to the project.
4.Add the followingCodeTo display the gallery:
This. MSI. imageopensucceeded + =New Routedeventhandler(Msi_imageopensucceeded );
VoidMsi_imageopensucceeded (ObjectSender,RoutedeventargsE)
{
PointPoint =This. MSI. viewportorigin;
MSI. viewportwidth = 1;
MSI. viewportorigin =New Point(0,-1, 0.3 );
}
This. MSI. Source =New Deepzoomimagetilesource(New Uri("Assets/dzc_output.xml",Urikind. Relative ));
5. To move and scale the gallery, addMousemove, lbuttondown, lbuttonup.
Private VoidZoom (DoubleZoomnew,PointP)
{
If(Zoomnew <0.5)
Zoomnew= 0.5;
MSI. zoomaboutlogicalpoint (zoomnew/zoom, p. x, P. y );
Zoom = zoomnew;
}
Okay. Run it. It's not very interesting! Let's see the effect.