Example tutorials for XAML markup language for WP8 and WIN8 application development layouts

Source: Internet
Author: User
Tags relative touch

XAML provides an extensible and positioned syntax to define a user interface that is logically detached from the program, which is very similar to the "code back" model in asp.net. XAML is a parsing language, although it can also be compiled. It has the advantage of simplifying the programmatic user-creation process, adding code to the application, and so on.

XAML Example

The following is a simple XAML example of creating a button.

Xaml

<grid x:name= "Contentpanel" grid.row= "1" margin= "12,0,12,0" >
<button height= "width=" 160 content= "click Me"/>
</Grid>

[Backcolor=rgb (248, 248, 248)!important] When running an application, it looks like this:
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] The Button control is specified by the element. The Width and Height attributes specify the size of the button. When you create a new Windows Phone application in Visual Studio, it is generated and will be used to place the object. To learn more about screen layouts, see the layout of Windows Phone.
[Backcolor=rgb (248, 248, 248)!important] can generate XAML using Visual Studio. For example, you can drag a button from the toolbox to the design surface. The following shows the XAML that Visual Studio might generate. (The appearance of XAML will vary.) )
[Backcolor=rgb (248, 248, 248)!important] Xaml
[/table]

<grid x:name= "Contentgrid" grid.row= "1" >
<button content= "button" height= "horizontalalignment=" "left" margin= "152,273,0,0" Name= "Button1" Verticalalignment= "Top" width= "160"/>
</Grid>


[Backcolor=rgb (248, 248, 248)!important] Note that Visual Studio added some additional features (for example, HorizontalAlignment and Margin) to place the button. If your needs are very clear, additional "pipe laying" may not be appropriate. Of course, you can also change these attributes using the Visual Studio UI, but in some cases you may want to edit the XAML directly.
[Backcolor=rgb (248, 248, 248)!important] One of the great benefits of using declarative languages, such as XAML, is that you can explicitly divide the markup that makes up the UI and the code that indicates that the application performs the action. For example, a designer on your team can design a UI experience and then hand XAML to developers to add program code. Even if the designer and developer are the same person (often this is the case), you can save your UI using a XAML file (. xaml) and save the program code with a code-behind file (. cs and. vb).
[Backcolor=rgb (248, 248, 248)!important] Note: XAML elements are equivalent to creating a UI for program code, but XAML is simpler. You can only implement it in your program code when you need to create the UI dynamically.
[Backcolor=rgb (248, 248, 248)!important] XAML and visual trees
[Backcolor=rgb (248, 248, 248)!important] in XAML, you have elements (for example, and) that can place other elements (nodes) underneath them (child elements). This parent/child relationship can specify such things as how objects are placed on the screen and how they respond to user-initiated events. Take a look at the example below.
[Backcolor=rgb (248, 248, 248)!important] When running an application, it looks like this:
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] Xaml

<grid x:name= "Contentpanel" background= "Red" grid.row= "1" margin= "12,0,12,0" >
<stackpanel margin= "background=" "Blue" >
<textblock name= "Firsttextblock" fontsize= ">first textblock</textblock>"
<textblock name= "Secondtextblock" fontsize= ">second textblock</textblock>"
<textblock name= "Thirdtextblock" fontsize= ">third textblock</textblock>"
</StackPanel>
</Grid>


[Backcolor=rgb (248, 248, 248)!important] The blue StackPanel is included in the red Grid. The TextBlock element is contained in the StackPanel (TextBlock element is a child element of StackPanel). In addition, TextBlock elements are stacked with each other so that they can be declared in XAML.
The tree diagram below [Backcolor=rgb (248, 248, 248)!important] illustrates the relationship between elements.
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] In addition to being able to determine how content is rendered, the visual tree can also affect how events are handled. Many typical events, called routed events, "bubble up" events in the tree. For example, you can attach an event handler to the StackPanel that occurs when the left mouse button is being handled (the MouseLeftButtonDown event). The following XAML demonstrates how to add a MouseLeftButtonDown event handler named Commonmousehandler to StackPanel.
[Backcolor=rgb (248, 248, 248)!important] Xaml

<grid background= "Red" x:name= "Contentpanel" grid.row= "1" margin= "12,0,12,0" >
<stackpanel margin= "background=" "Blue" mouseleftbuttondown= "Commonmousehandler" >
<textblock name= "Firsttextblock" fontsize= ">first textblock</textblock>"
<textblock name= "Secondtextblock" fontsize= ">second textblock</textblock>"
<textblock name= "Thirdtextblock" fontsize= ">third textblock</textblock>"
</StackPanel>
</Grid>


The following code shows the program code used to handle the event.
C#
Vb

private void Commonmousehandler (object sender, RoutedEventArgs e) {
FrameworkElement Fesource = E.originalsource as FrameworkElement;
Switch (fesource.name)
{
Case "Firsttextblock":
Firsttextblock.text = Firsttextblock.text + "click!";
Break
Case "Secondtextblock":
Secondtextblock.text = Secondtextblock.text + "click!";
Break
Case "Thirdtextblock":
Thirdtextblock.text = Thirdtextblock.text + "click!";
Break
}
}

[Backcolor=rgb (248, 248, 248)!important] The following illustration shows how events bubble up in the tree.
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] For example, we assume that the user clicked TextBlock.
[Backcolor=rgb (248, 248, 248)!important] 1. The MouseLeftButtonDown event will bubble up to the parent StackPanel.
[Backcolor=rgb (248, 248, 248)!important] 2. Next, the MouseLeftButtonDown event will bubble up to Grid in the tree.
[Backcolor=rgb (248, 248, 248)!important] because the event continues to move up in the tree, you can also "listen" to the MouseLeftButtonDown event in the Grid element
[Backcolor=rgb (248, 248, 248)!important] not just static UI
[Backcolor=rgb (248, 248, 248)!important] using XAML, you can do more than show static UI. You can create animations, embed videos, and bind to data using only tags. The following is an example of a simple animation created using XAML.
[Backcolor=rgb (248, 248, 248)!important] Xaml

<stackpanel background= "#FDF5E6" >
<StackPanel.Resources>
<storyboard x:name= "Mystoryboard" >
<doubleanimationusingkeyframes
Storyboard.targetname= "MyRectangle"
storyboard.targetproperty= "Height" >
<!--This key frame resets the animation to its starting
Value at the beginning of the animation. -->
<lineardoublekeyframe value= "keytime=" 0:0:0 "/>"
<!--Spline animations are used to create acceleration. This
SplineDoubleKeyFrame creates an animation this starts out slow
And then speeds up. The rectangle "Falls". -->
<splinedoublekeyframe keyspline= "0,0 1,0" value= "Keytime=" 0:0:0.8
<!--This spline animation creates the "bounce" at the end where
The rectangle shortens its length quickly at the A and then
Slows down and stops. -->
<splinedoublekeyframe keyspline= "0.10, 0.21 0.00, 1.0" value= "250"
Keytime= "0:0:1.5"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</StackPanel.Resources>
<rectangle x:name= "MyRectangle" mouseleftbuttondown= "mouse_clicked" fill= "Blue"
Width= "height="/>
</StackPanel>

C#
Vb

When the user clicks the rectangle, the animation begins.
private void Mouse_clicked (object sender, MouseEventArgs e) {
Mystoryboard.begin ();
}

This is an example of the behavior of specifying content using XAML, rather than specifying a layout or other static UI. The Storyboard element defines the common properties of some animations, such as what objects are animated. Storyboard's child elements (for example, LinearDoubleKeyFrame) specify how the animation is executed.
XML for the Android UI layout
Android uses XML to arrange the UI layout, and XML files are tree-structured, controlling the layout of the page.
Example
The following is an XML file for a button control:

<?xml version= "1.0" encoding= "Utf-8"?>
<button xmlns:android= "Http://schemas.android.com/apk/res/android"
Android:id= "@+id/button"
Android:text= ""
Android:layout_width= "Fill_parent"
android:layout_height= "Fill_parent"/>

[Backcolor=rgb (248, 248, 248)!important] class name button is the name of the XML element.
[Backcolor=rgb (248, 248, 248)!important]android:text defines the contents of the control.
[Backcolor=rgb (248, 248, 248)!important]android:layout_width and android:layout_height are sizes.
[Backcolor=rgb (248, 248, 248)!important] If you refer to a control in Java program code, you need a android:id. By adding code to the Oncreator () method of the activity: Setcontentview (R.layout.main), you can display the elements defined in the XML file. XAML Benefits
[Backcolor=rgb (248, 248, 248)!important]xml (extensible Markup Language, abbreviation: XML) is a markup language that is used to mark an electronic document so that it has a structured markup language, Can be used to mark data, define data types, and is a source language that allows users to define their own markup language. Although XML has the advantages of simplicity in syntax and ease of use, XML has many drawbacks compared to XAML. XAML simplifies the creation of the user interface on the. Net Framework 3.0 Programming mode, using XAML developers to make detailed arrangements for all user interface elements of a program, such as text, buttons, images, and list boxes, and to rationalize the entire interface. This is very similar to using HTML. However, because XAML is xml-based, it is a well-organized XML document in itself, and its syntax is more rigorous and explicit relative to HTML. It is expected that most of the XAML will be automatically generated by the corresponding software, just as we now make a static page, almost without writing any HTML code can directly through the Dreamweaver software to generate a beautiful page. But initially writing XAML code by hand would be an excellent learning experience, although the implementation process is a bit cumbersome, but will deepen your understanding of the XAML syntax and elements.
The xib of IOS UI layout
[Backcolor=rgb (248, 248, 248)!important] The Xib file is a visual element that describes the application's appearance, including Windows, views, controls, and others, and it can also describe non-visual elements, such as the objects in your application that manage Windows and views. Xib is an XML-encoded file, that is, the essence of the Xib file is to describe the programmer's settings in Xcode for view and its subclasses in the file in an XML script, Viewcontroller read xib files to control the layout of the interface.
Overview of layout layouts for Windows phone
[Backcolor=rgb (248, 248, 248)!important] layout refers to the process of resizing and locating objects in Windows Phone applications. To locate visual objects, you must place them in a container control or other container object originating from the Panel. Windows Phone offers a variety of Panel controls, such as Canvas, StackPanel, and Grid, which correspond to containers that allow you to locate and arrange controls.
[Backcolor=rgb (248, 248, 248)!important] The Windows Phone layout system supports both an absolute layout and a dynamic layout. In an absolute layout, use an explicit x/y coordinate to position the control (for example, by using Canvas). In a dynamic layout, the user interface is automatically resized based on different screen resolutions (for example, by using StackPanel or Grid).
Absolute layout
[Backcolor=rgb (248, 248, 248)!important] Arranges child elements within the layout panel in an absolute layout by specifying the exact position of the child element relative to its parent element. Absolute positioning does not take into account screen size. If the application requires that the UI elements be absolutely positioned, you can design different pages for different screen resolutions, or use zooming.
[Backcolor=rgb (248, 248, 248)!important] Windows Phone provides Canvas controls to support absolute positioning. By default, when you create a new Windows Phone application project, the root layout panel is grid, which creates a layout based on absolute positioning, and you must replace the grid with Canvas.
[Backcolor=rgb (248, 248, 248)!important] to position the control on the canvas, set the following additional properties on the control. When you use the designer in Visual Studio, these properties are updated when you drag the control to the design surface.
[Backcolor=rgb (248, 248, 248)!important] Canvas.Left
[Backcolor=rgb (248, 248, 248)!important] Canvas.Top
Android Absolute Layout
[Backcolor=rgb (248, 248, 248)!important] Android uses absolutelayout to achieve absolute layout, allowing child elements to specify exact x/y coordinate values and display them on the screen. (0, 0) is the upper-left corner, and when moving down or to the right, the coordinate value becomes larger. Absolutelayout does not have a page border, allowing elements to overlap (although not recommended). Because Android devices have different resolutions, the absolute layout does not adapt to these different resolution devices. Google's official documentation also indicates that it has expired, so it is generally no longer used in this way of layout.
Dynamic layout
[Backcolor=rgb (248, 248, 248)!important] In a dynamic layout, the user interface is displayed correctly according to the different screen resolutions. Arranges child elements by specifying how the child elements should be arranged relative to their parent elements and how lines should be wrapped. For example, you can arrange controls on a panel and specify that they should wrap horizontally. To use automatic or proportional sizing, you must assign special values to the Height and Width properties. The following are recommended settings for dynamic layouts:
[Backcolor=rgb (248, 248, 248)!important] sets the height and width of the control or layout to Auto. When these values are used for a control in the Grid layout, the control fills its cell. Controls, as well as Grid and StackPanel layouts, support automatic sizing.
[Backcolor=rgb (248, 248, 248)!important] for controls that contain text, remove the Height and Width properties, and set the MinWidth or MinHeight properties. This prevents the text from being reduced to an unreadable size.
[Backcolor=rgb (248, 248, 248)!important] to set proportional values for the rowdefinition and columndefinition elements in the Grid layout, use the relative height and width values. For example, to specify a column that is 5 times times wider than another column, in the columndefinition element, use "*" and "5*" for width.
Android Dynamic Layout
[Backcolor=rgb (248, 248, 248)!important] Android in addition to absolutelayout (absolute layout) There are four different layouts, respectively, linearlayout (linear layout), Framelayout (single frame layout), relativelayout (relative layout), and tablelayout (table layout). This is a layout that can be automatically adjusted and displayed correctly according to different screen resolutions and control sizes.
[Backcolor=rgb (248, 248, 248)!important] LinearLayout arranges child elements in either vertical or horizontal order, and each child element is positioned after the previous element. If it is vertically arranged, it will be a single n-row structure with only one element per row, regardless of the width of the element, and if it is horizontal, it will be a single row n column structure. If you build two rows of two columns, the usual way is to arrange the two elements vertically, and each element contains a linearlayout for horizontal arrangement. In the framelayout layout, the entire interface is treated as a blank standby area, all of the child elements can not be placed in the specified position, they are all placed in the upper left corner of the area, and the following child elements directly cover the front of the child elements, the front of the child element part and all occlusion. Relativelayout completes the layout according to the position relationship between the child elements. Position-related properties in child elements in this layout will take effect. such as Android:layout_below, Android:layout_above and so on. The child elements match the specified location relationship with these properties and their respective IDs. Tablelayout, as the name suggests, this layout is a table layout and applies to the layout format of n rows n columns. A tablelayout consists of many TableRow, and a tablerow represents a row in tablelayout. TableRow is a subclass of LinearLayout, its android:orientation attribute value is horizontal, and its android:layout_width and Android:layout_ The Height property value is constant to match_parent and wrap_content. So its child elements are arranged horizontally, and are broadly consistent. This design makes the child elements in each TableRow equal to the cells in the table. In TableRow, cells can be empty, but they cannot span columns.
Screen direction Windows Phone
[Backcolor=rgb (248, 248, 248)!important] Windows Phone supports the following screen orientations:
[Backcolor=rgb (248, 248, 248)!important] longitudinal
[Backcolor=rgb (248, 248, 248)!important] to the left landscape
[Backcolor=rgb (248, 248, 248)!important] to the right landscape
[Backcolor=rgb (248, 248, 248)!important] Users can easily start changes from one direction to another by rotating the device. When you test your application in the emulator, you can toggle the screen orientation by clicking the button in the Emulator toolbar. The direction button contains rectangles with arrowheads that indicate changes in orientation.
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] In portrait orientation, the page is displayed vertically so that the height of the page is greater than its width.
[Backcolor=rgb (248, 248, 248)!important] in either direction in both directions, the status bar and the application bar are located on one side of the screen with the power and start buttons. The status bar of the horizontal left view is on the left, and the status bar in the horizontal right view is on the right.
[Backcolor=rgb (248, 248, 248)!important] The default direction applied is portrait, and you must add additional code to support landscape. You cannot specify only the left or right landscape orientation. If you want to support landscape orientation, you must also support two directions to the left and right. To specify that the application supports portrait and landscape, you must set the Supportedorientations property to Portraitorlandscape in XAML or code.
[Backcolor=rgb (248, 248, 248)!important] You can use different methods to display content in portrait or landscape orientation. Two of these methods are scrolling and grid layout.
[Backcolor=rgb (248, 248, 248)!important] 1. Rolling
The [Backcolor=rgb (248, 248, 248)!important] Scrolling method uses the ScrollViewer control that is placed inside the StackPanel control. Use this method if you want to display the contents of a list or if you have a different control on the page that is displayed next. StackPanel allows you to sort the elements one by one in the application, and when you switch from portrait to landscape, the ScrollViewer control allows you to scroll through StackPanel if the UI element is not on the screen.
[Backcolor=rgb (248, 248, 248)!important] To use the scrolling method, you typically perform the following steps.
[Backcolor=rgb (248, 248, 248)!important] Change the page's Supportedorientations property to Portraitorlandscape.
[Backcolor=rgb (248, 248, 248)!important] replaces the default Grid in the Content panel area with ScrollViewer and StackPanel.
[Backcolor=rgb (248, 248, 248)!important] 2. Grid layout
[Backcolor=rgb (248, 248, 248)!important] The grid layout method places the UI elements in the grid. When direction changes occur, you can programmatically reposition elements in different cells in the grid.
[Backcolor=rgb (248, 248, 248)!important] To use the Grid layout method, you typically perform the following steps.
[Backcolor=rgb (248, 248, 248)!important] 1. Change the Supportedorientations property of the page to Portraitorlandscape.
[Backcolor=rgb (248, 248, 248)!important] 2. Use Grid for the content panel.
[Backcolor=rgb (248, 248, 248)!important] 3. Create a Orientationchanged event handler and add code to reposition the element in the Grid.
Screen orientation change handling in Android
[Backcolor=rgb (248, 248, 248)!important] Android supports both portrait and landscape screen orientations, with the default vertical. When the screen direction changes, everything on the user interface needs to be updated to fit the new screen orientation. Because activity is the most important mechanism for interacting with users, it includes specialized support for handling configuration changes. Unless you specify otherwise, your current activity will be destroyed when the screen direction changes, which is done through a normal activity lifecycle process (Onfreeze (Bundle), OnPause (), OnStop (), and Ondestro Y ()). If the activity is in the foreground before the event, when the OnDestroy () call to this instance is completed, a new instance of the activity is started and the content saved by Onfreeze (Bundle) in the previous instance is passed to the new instance. Because any application resources, including layout files, may change due to any configuration value. So the only safe way to handle configuration changes is to retrieve all of the resources, including layout, drawing resources (original Drawables), string resources. Since the activity has already saved its state and rebuilt itself from these states, it is a convenient way for the activity to restart itself to obtain a new configuration.
iOS screen orientation
[Backcolor=rgb (248, 248, 248)!important] iOS supports portrait, Portraitupsidedown, Landscapeleft, landscaperight four screen orientations. Use Uiviewcontroller to control screen rotation by calling Viewcontroller's Willrotatetointerfaceorientation:duration, viewwilllayoutsubviews , Willanimaterotationtointerfaceorientation:duration, and Didrotatefrominterfaceorientation methods are implemented.
[Backcolor=rgb (248, 248, 248)!important] More content see iOS screen rotation
Resolution
[Backcolor=rgb (248, 248, 248)!important] Windows Phone 8 supports mobile phones with WVGA, WXGA, and 720p resolution. This differs from Windows Phone OS 7.1, which supports only WVGA resolutions. This topic describes the resolution supported by Windows phone 8 and how to develop mobile-phone applications using different resolutions.
Windows Phone
[Backcolor=rgb (248, 248, 248)!important] The following table describes the resolution and aspect ratios that are supported in Windows Phone 8.
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] The following illustration shows the same screen displayed in a mobile phone with a different resolution.
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] because all Windows Phone OS 7.1 phones have the same resolution, you can lay out the content to make it appear well on the Windows Phone OS 7.1 phone and do It will be good on all Windows phone OS 7.1 phones. You do not need to consider internal issues such as how each control stretches and flows.
[Backcolor=rgb (248, 248, 248)!important] in Windows Phone 8, you need layout controls and other UI elements so that they appear well in the aspect ratio of each support. Because the Windows phone 8 phone has two aspect ratios (15:9 or 16:9), the control for one aspect ratio layout may have an unexpected layout under another aspect ratio.
[Backcolor=rgb (248, 248, 248)!important] to make the page appear correctly on a mobile phone with a resolution of WVGA, WXGA, 720p, and 1080p, do not hard-code the control's length and width or margins. After you drag and drop controls from the Toolbox, delete or carefully test the automatically added margins.
[Backcolor=rgb (248, 248, 248)!important] to create an adaptive layout, you can use containers such as grid controls. Instead of hard-coded the control's height and width, it places the control in the grid and uses the * and Auto values to set the height and width of its rows and columns. In this way, the application can stretch or scale the control to fit the user's phone's height and width. If you hard-code the height and width of a control, the layout does not fit into other resolutions.
[Backcolor=rgb (248, 248, 248)!important] to display the splash screen for all resolutions, use a single image file named 768x1280 with a resolution of splashscreenimage.jpg. The phone will automatically scale the image to the appropriate size.
[Backcolor=rgb (248, 248, 248)!important] If you want to provide a perfect splash screen for pixels of various pixels, you can add images using the following file name:
[Backcolor=rgb (248, 248, 248)!important] splashscreenimage.screen-wvga.jpg
[Backcolor=rgb (248, 248, 248)!important] splashscreenimage.screen-wxga.jpg
[Backcolor=rgb (248, 248, 248)!important] splashscreenimage.screen-720p.jpg
[Backcolor=rgb (248, 248, 248)!important]1080p will automatically use the Splashscreenimage.screen-720p.jpg file to display the splash screen
[Backcolor=rgb (248, 248, 248)!important] All splash screen images must be included in the root folder of the application project.
Android
[Backcolor=rgb (248, 248, 248)!important]1.5 and earlier versions of the Android system were designed with the assumption that the system would only run at--HVGA (320x480) resolution on a single resolution device with a size of 3.2 inches. Since the system can only work on one screen, developers can write their own programs for that screen without having to consider the program's display on other screens.
But since Android 1.6, the system has introduced support for multiple sizes and multiple resolution screens to meet the operational requirements of a new platform with a variety of configurations. This means that developers will need to make extra designs for their programs to display well on multiple resolution screens when developing programs for Android 1.6 or newer systems.
In order to simplify the programmer's face at various resolutions, and to have a variety of resolution of the platform can directly run these programs, the Android platform for all the screen in density and resolution of the classification, divided into three categories:
[Backcolor=rgb (248, 248, 248)!important] Three main sizes: large, normal, small;
Three different densities: high (hdpi), Medium (MDPI) and Low (LDPI).
[Backcolor=rgb (248, 248, 248)!important] If necessary, programs can provide different resources (mainly layouts) for screens of various sizes, or they can provide different resources (mostly bitmaps) for screens of various densities. In addition, the program does not need to make any additional processing for the size or density of the screen. When executed, the platform automatically loads the corresponding resources according to the size and density characteristics of the screen itself, and converts them from logical pixels (DIP, which defines the interface layout) to physical pixels on the screen.
Ios
[Backcolor=rgb (248, 248, 248) The fragmentation of!important]ios devices is clearly well controlled, which greatly reduces the duplication of work by game developers. Currently, the resolution of IOS devices are:
[Backcolor=rgb (248, 248, 248)!important]iphone 1, 3G, 3gs,ipod touch 1, 2, 3:320*480 (normal screen)
[Backcolor=rgb (248, 248, 248)!important]iphone 4, 4s,ipod touch 4:640*960 (3:2 retina screen)
[Backcolor=rgb (248, 248, 248)!important]iphone 5,ipod Touch 5:640*1136 (16:9 retina screen)
[Backcolor=rgb (248, 248, 248)!important]ipad 1,ipad2,ipad-mini:768*1024 (normal screen)
[Backcolor=rgb (248, 248, 248)!important] New ipad,ipad 4:1536*2048 (Retina screen)
Layout of Windows Store application
[Backcolor=rgb (248, 248, 248)!important] understand the layout of Windows application store applications and their differences from traditional desktop applications. You can use a variety of interfaces in Windows application store applications, such as application windows, surfacing controls, dialog boxes, and application bars. The ability to choose the right interface based on the appropriate situation will determine whether the application is easy to use or difficult to use.
Apply a page or canvas
[Backcolor=rgb (248, 248, 248)!important] application pages (sometimes called canvases) are the basis of the UI. The canvas holds all the content and controls. You should integrate UI elements into this basic interface as much as possible. For example, you can display, hide, or switch error messages smoothly through a built-in animation of a window instead of using the surfacing control to display errors. Displaying an embedded UI allows users to be completely immersed in the application and maintain a sense of relevance.
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] You can create the required number of application pages to support your user program. See Planning the Windows store application and navigation design to learn more about setting the layout of application pages to support user scenarios.
Adjust size
[Backcolor=rgb (248, 248, 248)!important] People can adjust the size of your application so that they can use another application, or resize another application so that they can use your application. You can design your application so that content flow dynamically optimizes the user experience as the user adjusts the size of your application.
[Table=98%,rgb (248, 248, 248)]
Fullscreen
The application fills the entire screen.

Size adjusted
The application is attached to a narrow area of the entire screen.
Other applications will fill up the remaining screen areas that are not occupied by applications that are in the attached state.
[Backcolor=rgb (248, 248, 248)!important] For more information, see Sizing Guide.
Touch Keyboard and Handwriting panel
[Backcolor=rgb (248, 248, 248)!important] Touch Keyboard and handwriting panel provides a secondary command UI for entering text. This panel is displayed when a user touches an editable input field in a Windows store application, or when the user clicks the keyboard icon in the desktop taskbar. This panel disappears when the input field loses focus.
[Backcolor=rgb (248, 248, 248)!important] Touch the keyboard to support text entry and editing for profile specifications that do not have a hardware keyboard or other peripheral keyboard devices. The handwriting Panel enables text entry and editing for the handwriting profile specification.
[Backcolor=rgb (248, 248, 248)!important] similar to the view state mentioned earlier, you can design your application so that content flow can dynamically optimize the user experience when displaying touch keyboards and handwriting panels.
[Backcolor=rgb (248, 248, 248)!important] For more information on supporting these text input patterns, see the touch Pad and Handwriting Panel guide.
Application Bar
The [Backcolor=rgb (248, 248, 248)!important] Application bar, located outside the Application page, is the primary command interface for the application. Use the application bar to display some navigation options, commands, and tools to the user. By default, the application bar is hidden, and the application bar is displayed when the user uses a finger to swipe from the top or bottom edge of the screen. The application bar overrides the application, and the user can cancel the application bar by sweeping from the edge or interacting with the application.
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] See command design for more information about designing your commands, see the Application Bar Guide for a user experience guide
[Backcolor=rgb (248, 248, 248)!important] Implementation of the application bar in Android and iOS
[Backcolor=rgb (248, 248, 248)!important] Use the "Action Bar" in Android applications, similar to the application bar applied by the Windows application store. The action Bar is a set of columns that are the top of the active page, such as the split Action Bar, which is displayed at both the top and bottom of the page, and contain controls that users can interact with to perform context-sensitive operations or navigate between activities.
[Backcolor=rgb (248, 248, 248)!important] The Uitoolbar implementation toolbar in iOS is similar to the AppBar functionality applied by the Windows Store, which is located at the top or bottom of the screen page for managed context-related menu items and actions.
Super button
[Backcolor=rgb (248, 248, 248)!important] The Super button is a set of specific and consistent buttons used by users in each application: Search, share, connect, settings, and start. We believe that these are the core operations that each user needs to perform in almost every application they use.
[Backcolor=rgb (248, 248, 248)!important] Search users can search for content in your application or other applications, and can search for content in your application from other applications.
[Backcolor=rgb (248, 248, 248)!important] shared users can share the content of your application with others or services.
[Backcolor=rgb (248, 248, 248)!important] device users can connect to devices and send content, streaming media, and printing.
[Backcolor=rgb (248, 248, 248)!important] Settings Users can configure applications based on their preferences and access user assistance.
[Backcolor=rgb (248, 248, 248)!important] Start the user can go directly to the "Start" screen.
[Backcolor=rgb (248, 248, 248)!important]
[Backcolor=rgb (248, 248, 248)!important] For more information, see the following guidelines: Search, share, apply settings, and apply Help
[Backcolor=rgb (248, 248, 248)!important] The most similar equivalent control on IOS is Uiactivityviewcontroller

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.