Step 9: port the Windows 8 metroui Application

Source: Internet
Author: User

Win8 Metro UI application development is a very interesting thing, especially when it uses a very strange Metro UI design. If the existing application of traditional uidesign can be easily transplanted to Win8, and the magic of Metro UI can be fully utilized, it will be very meaningful. This blog is about how to port a traditional UI application to a Metro UI application.

Porting seems difficult, but according to the rules, many things are only time and patience problems. You may wish to use the 9-step method to transplant your application:

  1. Download and install Windows 8 consumer preview, and download and install Microsoft Visual Studio 11 express beta.
  2. Use Microsoft Visual Studio 11 express Beta to create a Metro UI application project. You can select your preferred C/C ++, C #, or Visual Basic language.
  3. Copy the folders, source code, and resource files you want to reuse to your new project, and select show all filters in Solution Explorer.
  4. Right-click your folder and file and add it to the new project.
  5. Use the search replacement method of the entire project to replace system. Windows with windows. UI. XAML.

Silverlight XAML namespaces

Windows runtime XAML namespaces

System. Windows

Windows. UI. XAML

System. Windows. Automation

Windows. UI. XAML. Automation

System. Windows. Automation. Peers

Windows. UI. XAML. Automation. Peers

System. Windows. Automation. Provider

Windows. UI. XAML. Automation. Provider

System. Windows. Automation. Text

Windows. UI. XAML. Automation. Text

System. Windows. Controls

Windows. UI. XAML. Controls

System. Windows. Controls. primitives

Windows. UI. XAML. Controls. primitives

System. Windows. Data

Windows. UI. XAML. Data

System. Windows. Documents

Windows. UI. XAML. Documents

System. Windows. Input

Windows. UI. XAML. Input

System. Windows. InterOP

Windows. UI. XAML. InterOP

System. Windows. Markup

Windows. UI. XAML. Markup

System. Windows. Media

Windows. UI. XAML. Media

System. Windows. Media. Animation

Windows. UI. XAML. Media. Animation

System. Windows. Media. Imaging

Windows. UI. XAML. Media. Imaging

System. Windows. Media. media3d

Windows. UI. XAML. Media. media3d

System. Windows. Navigation

Windows. UI. XAML. Navigation

System. Windows. Printing

Windows. UI. XAML. Printing

System. Windows. Resources

Windows. UI. XAML. Resources

System. Windows. Shapes

Windows. UI. XAML. Shapes

 

  1. Copy the reusable XAML code to the project's XAML file (you can create a new XAML file as needed ).
  2. Compile your project and use the error message to quickly locate the location to be modified. Use Windows runtime APIs to replace. Net APIs of the Yuan Dynasty.
  3. For the code that cannot be simply replaced, use comments to temporarily block it so that it can be modified later. Repeat Methods 7 and 8 until the entire project is fully compiled.
  4. Solve the code parts temporarily blocked one by one. After all the relevant modifications are completed, your migration is basically completed. The following work is to solve the bugs.

 

How is it? Is it relatively simple! Try J now.

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.