Learn the Windows Phone 7 development together (four. Deepzoom)

Source: Internet
Author: User

Deepzoom is one of the features of Silverlight and is also added to Windows Phone 7. This feature should now be considered the main function of the Phone7 UI. Because many of Phone7 's UI is deepzoom developed, in addition to the MIX10 Assembly has exhibited comic reading software is also developed by the Deepzoom, which can also see the importance of this function in the Phone7.

A To develop Deepzoom, you first need deepzoom composer the tool under expression to generate the Deepzoom atlas.

Two Create a new Windows Phone application and add the following statement to the XAML design window:

<MultiScaleImage x:Name="msi" Width="486" Height="652"  VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-6,0,0,0" />

Only multiscaleimage can be used in Phone7 to show the Deepzoom Atlas.

Three Add the Deepzoom composer generated Atlas to the project.

Four Add the following code to display the atlas:

this.msi.ImageOpenSucceeded += new RoutedEventHandler(msi_ImageOpenSucceeded);

void msi_ImageOpenSucceeded(object sender, RoutedEventArgs e)
         {
             Point point = this.msi.ViewportOrigin;
             msi.ViewportWidth = 1;
             msi.ViewportOrigin = new Point(0, -0.3);
         }

this.msi.Source = new DeepZoomImageTileSource(new Uri("Assets /dzc_output.xml", UriKind.Relative));

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.