"16.Windows Phone" 16.1Windows Phone7 Development Foundation

Source: Internet
Author: User

1.Windows Phone Development Overview

Windows phone is a new generation of smartphone operating systems introduced by Microsoft. The first-generation Windows Phone system is codenamed Windows Phone 7, abbreviated WP7.

Starting with the second-generation Windows Phone 8, the Windows Phone system started using the same kernel as the Windows 8 operating system, making it easier to migrate apps under the Windows platform.

We also often call the Windows Phone's smartphone, which is the most famous of Nokia's Lumia series, as a window phone. Windows phone has a sizeable market in Europe and the US, becoming the third-largest smartphone operating system following Andorid and iOS. As Microsoft's mobile platform.

Windows phone is undoubtedly using. NET technology for app development. Here's a quick introduction to Windows Phone development.

2.APP Common Configuration

We can set the app name, display icon, default launch page, etc. in the "project" → "Properties" → "wmappmanifest.xml" file.

    • The Title property configures the name that the app displays in the program list
1 <Appxmlns=""ProductID="{E1A09F8A-6322-4F17-B7CF-FEFB14F095D9}"Title= "Test App"RuntimeType= "Silverlight"Version= "1.0.0.0"Genre= "Apps.normal"Author= "collections Author"Description= "Sample description"Publisher= "Collections">

    • IconPath Configure the icon that the app displays in the Programs list (the icon "Build Action" is set to "content")
1 <  isrelative= "true"  isresource= "false"> Applicationicon.png</iconpath>

    • Defaulttask setting the app's launch page (name must be _default)
1 < Tasks > 2     < Defaulttask    = "_default"  navigationpage= "MainPage.xaml"/>3  </Tasks>

    • SPLASHSCREENLMAGE.IPG is the app's splash screen, which is displayed when the app starts, until it's loaded. The file name of the picture is fixed, and the build action is set to content. This image can be modified to personalize the product information.
1 <  isrelative= "true"  isresource= "false">background.png </ Backgroundimageuri >

    • The app supports mobile screen rotation, setting the PhoneApplicationPage Supportedorientations property to Portraitorlandscape. The page orientation is controlled by the Orientation property when the app starts, and is displayed vertically (Portrait) by default
    • WP each app has a ProductID as a unique identity, WP to determine the identity of the software, the same app on the upgrade to replace, covering the original isolatestorage, otherwise considered to be a new APP,WP will be created for it isolatedstorage. ProductID is a GUID that is set in the Wmappmainfest.xaml file under the Project Properties folder.

3. Theme Styles

There are statements like this when you set the properties of a page element at the beginning of each XAML page:

1 fontfamily= "{StaticResource phonefontfamilynormal}" 2 fontsize= "{StaticResource phonefontsizenormal}" 3 foreground= "{StaticResource Phoneforegroundbrush}" 

The static resources defined by the Windows Phone system, which are applied in braces, are also known as system themes, and by default the program's pages apply the system theme defined by the user's phone, so we see that when we change the theme of the phone, the color of the program page changes as well, which is the binding system resource.

We can invoke system themes if necessary, but we do not have permission to modify these topics. For example, if we want to beautify a control, we can call it to bind the system resources. Similar to foreground= "{StaticResource Phoneforegroundbrush} set a property binding system resource, or you can bind system resources directly in the Properties panel, you can set a color value, or set a gradient in the Properties panel.

In addition to using system themes, we can also customize theme styles. defined in the same way as WPF, see 2.10 theme styles.

4. image file Generation operations

Picture files often require different build action properties to be set in different scenarios. There are two common types of build operations. Buildaction=content pictures are compressed in the XAP package. You can use it as an icon for AppBar, such as buildaction=embeded Resource (embedded resources). Image integration in the main file DLL, you can do background pictures and so on.

"16.Windows Phone" 16.1Windows Phone7 Development Foundation

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.