New Features of Windows Phone Developer Tools RTW-Internal Control

Source: Internet
Author: User

Ie9 Beta has been released, and Windows Phone Developer Tools RTW has also arrived. Developers and enthusiasts are busy again. Many friends in the garden have already started research, including Ma Ning, Zhang Xin, Jake, randylee, and chenkai. Let me join.

Windows Phone Developer Tools RTW has just been installed. Some new UI features, including Bing Maps Silverlight Control for Windows Phone, Panorama Control for Windows Phone, and external control for Windows Phone. This time we will practice the render control.

First, you can refer to the document UI design and interaction guide for Windows Phone 7-v2.0. A few friends in the garden translated the first version of this document together with the wpmind webmaster's finger. You can download it at http://www.wpmind.com.

The pivot control provides a quick way to manage views or pages in an application. Pivot can be used to filter large datasets, browse multiple datasets, or switch the application view. Pivot controls are horizontally placed adjacent to independent views, and navigation on the left and right is managed at the same time. You can use flick or pan gestures to push pivot controls.

When designing a program, consider the following considerations:

  • The application should minimize the number of response pages.
  • The content of the hosts page is defined by the application.
  • The renewal page is cyclical.
  • The secondary page cannot overwrite the horizontal pan and horizontal flick functions because it conflicts with the interaction design of the pivot control.
  • The length of the title text is unlimited. The number of displayed text is subject to the width of the pivot control.
  • The height of the title cannot be changed.
  • The pivot control should only be used to display entries or data of the same type.
  • This control should not be used for task flow. Different pages should be seamlessly switched in terms of appearance. The page should not greatly change user activity.
  • Pivot controls should be used less often.
  • If the user does not have the possibility to add information, an empty renewal page should be deleted.

The following example shows how to add the lifecycle control to an application.

1. Enable Visual Studio 2010 express for Windows Phone, create a C # project, select the Windows Phone application template, and the project name is effectdemo.

2. Add a new project to the project, select Windows Phone development page, and name it effectpage. XAML, as shown in:

3. InMainpage. XAMLFile, which isContentpanelAdd a new element. The Code is as follows:

<Hyperlinkbutton content = "your application example" Height = "57" horizontalalignment = "Left" margin = "49,116, 383 "name =" hyperlinkbutton1 "verticalignment =" TOP "width =" "navigateuri ="/ttpage1.xaml "/>

4. InPivotpage. XAMLAdd a new titem to the file. The Code is as follows:

<! -- Define item three. -->
<Controls: effectitem header = "item3">
<GRID/>
</Controls: effectitem>

5. add controls and content for the lifecycle item. Add textblock control for the first effectitem. The Code is as follows:

<Grid>
<! -- Added Textbox Control with formatted text. -->
<Textblock
Textwrapping = "Wrap"
Style = "{staticresource phonetextlargestyle}">
<Run> This is a simple sample for the specified control adding text. </run>
<Linebreak/>
<Linebreak/>
<Run> you can put any content you want here... </run>
</Textblock>
</GRID>

Add a background image and text for the second effectitem. The Code is as follows:

<! -- Added background image and text content. -->
<Border
Borderbrush = "{staticresource phoneforegroundbrush }"
Borderthickness = "{staticresource phoneborderthickness}">
<Grid>
<Image
Source = "panoramabg.png"
Stretch = "uniformtofill"/>
<Textblock
TEXT = "here is some generic content to take up space ."
Textwrapping = "Wrap"
Style = "{staticresource phonetextextralargestyle}"/>
</GRID>
</Border>

Add ListBox to the third javastitem and write some strings to it. Vertical scrolling is supported. The Code is as follows:

<! -- This Code adds a series of string text values. -->
<Grid>
<ListBox fontsize = "{staticresource phonefontsizelarge}">
<SYS: String> This </sys: String>
<SYS: String> item </sys: String>
<SYS: String> has </sys: String>
<SYS: String> A </sys: String>
<SYS: String> short </sys: String>
<SYS: String> List </sys: String>
<SYS: String> of </sys: String>
<SYS: String> strings </sys: String>
<SYS: String> that </sys: String>
<SYS: String> You </sys: String>
<SYS: String> can </sys: String>
<SYS: String> scroll </sys: String>
<SYS: String> up </sys: String>
<SYS: String> and </sys: String>
<SYS: String> down </sys: String>
<SYS: String> and </sys: String>
<SYS: String> back </sys: String>
<SYS: String> again. </sys: String>
</ListBox>
</GRID>

In addition, to enable the ListBox control to support multiline strings, you must add references:

Xmlns: SYS = "CLR-namespace: system; Assembly = mscorlib"

6. Compile the code and debug the simulator, as shown in.

Attached source code: pivotdemo.zip

Video demo address: http://v.youku.com/v_show/id_XMjA4MTk3MDg0.html

 

Reference link:

Firewall Control for Windows Phone

First version of Windows Phone 7 UI design and human-computer interaction Guide

UI design and interaction guide for Windows Phone 7 V2.0

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.