aplicações e desenvolvimento para mobile - revisões de wp7.pdf
Post on 14-Apr-2018
218 Views
Preview:
TRANSCRIPT
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
1/27
1
ADM - Revises para Exame WP7Domingo, 15 de Julho de 2012
Verso 2.0
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
2/27
2
CONTENTS
Application Platform Overview ......................................................................................................................................................... 4
Introduction .................................................................................................................................................................................... 4
Overview ......................................................................................................................................................................................... 4
Architecture .................................................................................................................................................................................... 5
Runtimes ..................................................................................................................................................................................... 5
Tools ............................................................................................................................................................................................ 6
Cloud Services ............................................................................................................................................................................. 7
Portal Services ............................................................................................................................................................................. 7
Application Development Lifecycle ................................................................................................................................................. 8
Application Bar for Windows Phone ................................................................................................................................................... 9
Application Bar User Interface ........................................................................................................................................................ 9Menu Items ................................................................................................................................................................................. 9
Application Bar Development ....................................................................................................................................................... 10
Application Bar Properties ............................................................................................................................................................ 10
Application Bar Best Practices ...................................................................................................................................................... 11
Controls for Windows Phone ............................................................................................................................................................ 11
Base Controls for Windows Phone ............................................................................................................................................... 11
Overview ................................................................................................................................................................................... 11
Supported Controls in Windows Phone .................................................................................................................................... 11
Silverlight for Windows Phone Toolkit Controls ....................................................................................................................... 13
Unsupported Controls............................................................................................................................................................... 13
Panorama Control for Windows Phone ........................................................................................................................................ 14
Panorama Control ..................................................................................................................................................................... 15
Panorama Best Practices........................................................................................................................................................... 16
Other Resources........................................................................................................................................................................ 17
Pivot Control for Windows Phone ................................................................................................................................................ 17
Pivot Control ............................................................................................................................................................................. 18
PivotItem Control ...................................................................................................................................................................... 18
Pivot Control Best Practices ...................................................................................................................................................... 19
Location for Windows Phone ........................................................................................................................................................ 19
Location Service Architecture ................................................................................................................................................... 19
Push Notifications for Windows Phone ............................................................................................................................................ 20
Types of Notifications ................................................................................................................................................................... 21
Toast Notifications .................................................................................................................................................................... 21
Tile Notifications ....................................................................................................................................................................... 21
Raw Notifications ...................................................................................................................................................................... 22
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
3/27
3
Hardware Specifications for Windows Phone .................................................................................................................................. 22
Standard Hardware ....................................................................................................................................................................... 22
Optional Hardware........................................................................................................................................................................ 22
Application Manifest File for Windows Phone ................................................................................................................................. 23
DEPLOYMENT Element.................................................................................................................................................................. 24
APP Element ........................................................ ................................................................. ......................................................... 24
ICONPATH Element ....................................................................................................................................................................... 25
CAPABILITIES Element ................................................................................................................................................................... 25
CAPABILITY Element .................................................................................................................................................................. 25
REQUIREMENTS Element .............................................................................................................................................................. 26
REQUIREMENT Element ............................................................................................................................................................ 26
TASKS Element .............................................................................................................................................................................. 26
TOKENS Element ........................................................................................................................................................................... 26
PRIMARYTOKEN Element .......................................................................................................................................................... 26
TEMPLATETYPE5 Element ......................................................................................................................................................... 27
EXTENSIONS Element .................................................................................................................................................................... 27
EXTENSION Element .................................................................................................................................................................. 27
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
4/27
4
APPLICATION PLATFORM OVERVIEWPasted from
INTRODUCTION
The Windows Phone Application Platform enables developers to create engaging consumer experiences running on aWindows Phone. It is built upon existing Microsoft tools and technologies such as Visual Studio, Expression
Blend, Silverlight, and the XNA Framework. Developers already familiar with those technologies and their related
tools will be able to create new applications for Windows Phone without a steep learning curve.
OVERVIEW
The Windows Phone Application Platform provides two frameworks for developing applications:
1. The Silverlight framework for event-driven, XAML-based application development that allows developers to developcreative markup-based user experiences and rich media applications.
2. The XNA Framework for loop-based games that enables immersive and fun gaming and entertainment experiences.
With Windows Phone 7.5, you can now combine Silverlight and the XNA Framework into a single application.
The Windows Phone Application Platform helps developers to create applications by providing:
A familiar and inexpensive toolset. A cohesive and well-designed managed API set. An isolated sandbox for each application. Runtime services on devices that can be used to access web services in the cloud, such as Xbox LIVE, Windows
Azure, location, and notification services. Access to third-party Windows Communication Foundation (WCF) and
Representational State Transfer (REST) services across the web is also supported.
The Windows Phone Marketplace to distribute their application.
The Windows Phone Application Platform is designed to support the multi-screen world that consumers live in.
http://msdn.microsoft.com/en-us/library/ff402531(v=vs.92).aspxhttp://msdn.microsoft.com/en-us/library/ff402531(v=vs.92).aspxhttp://msdn.microsoft.com/en-us/library/ff402531(v=vs.92).aspxhttp://msdn.microsoft.com/en-us/library/ff402531(v=vs.92).aspx -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
5/27
5
Consumers today use a variety of screens and devices, all equally important and all tied together by the cloud, which
connects the relevant information together, providing users with the information they need as they move from device to
device. Common user experiences make it easy to move between devices, and a common development platform makes it
easy to develop applications for all the device types.
ARCHITECTURE
The Windows Phone Application Platform architecture is made up of four main components.
1. Runtimes Silverlight and the XNA Framework, along with Windows Phone specific features, combine to provide amature environment on which to build secure, graphically rich applications.
2. Tools Visual Studio and Expression Blend, and their related tools and documentation, create a complete developerexperience for quickly creating, debugging, deploying, and updating applications.
3. Cloud Services Windows Azure, Xbox LIVE Services, Notifications services, and Location services, along with a varietyof other web services, allow developers to share data across the cloud and benefits consumers by providing a
seamless experience across whatever device they are using. Connections to third-party web services are also fully
supported.
4. Portal Services The Windows Phone Marketplace provide robust services that allow developers to register, certify,and market their applications.
RUNTIMES
With Silverlight and the XNA Framework, all development is done in managed code, in a protected sandbox allowing for the
rapid development of safe and secure applications. Applications written for Silverlight or the XNA Framework today will run
on Windows Phone with only a minor number of adjustments, such as for screen size or for device-specific features.
The two frameworks, along with Windows Phonespecific components and the Common Base Class Library provide a
substantial number of components for developers to construct applications on.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
6/27
6
Silverlight - Silverlight is the ideal framework for creating Rich Internet Application-style user interfaces. A
Windows Phone Silverlight application exposes its UI through a set of pages. Windows Phone controls that match the
Windows Phone visual style can be used to enhance the look and feel of the UI.
XNA Framework- The XNA Framework is composed of software, services, and resources focused on enabling game
developers to be successful developing on Microsoft gaming platforms. Microsoft provides technology that allows
professional developers to quickly enable games on platforms like Windows Phone, Xbox 360, Zune HD, and
Windows 7. The XNA Framework provides a complete set of managed APIs for game development. This includes 2D
sprite-based APIs that support rotation, scaling, stretching, and filtering as well as 3D graphics APIs for 3D geometry,
textures, and standard lighting and shading.
Sensors - A variety of sensors will return data that can be consumed by developers. For example, multi-touch input,
accelerometer, compass, gyroscope, and microphone sensors will all be accessible by APIs
Media Both Silverlight and the XNA Framework provide developers with a programming model for building rich
user experiences that incorporate graphics, animation, and media. The managed APIs support a variety of media
formats and allow for discovery and enumeration of media on the device and for playback of that media.
Data - Isolated storage allows an application to create and maintain data in a sandboxed isolated virtual folder. All I/O
operations are restricted to isolated storage and do not have direct access to the underlying operating system file system.
This prevents unauthorized access and data corruption by other applications.
Structured data can be stored in a relational database and can be accessed by using LINQ to SQL.
Location - The Microsoft Location Service for Windows Phone allows application developers to access the users
physical location information from a single API. Developers can query for the current location, subscribe to Location
Changed events, set the desired accuracy of the data, get access to the device heading and speed, and calculate the
distance between points. The Location APIs on the phone will work in conjunction with the Location Cloud Services.
TOOLS
Developers can download and install a package that includes all the tools that they need to start developing
applications for Windows Phone.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
7/27
7
Visual Studio 2010 - Visual Studio is the IDE for building Windows Phone applications. Within the Visual Studio IDE,
developers can create Silverlight or XNA Framework programs that run on Windows Phone. Visual Studio includes a
designer, debugger, project system, packager, and manifest generation.
Expression Blend - Expression Blend for Windows Phone allows designers to create XAML-based interfaces for
Windows Phone applications, whose behaviors can then be implemented by developers in Visual Studio.
Windows Phone Emulator - Windows Phone Emulator is integrated into Visual Studio and Expression Blend to make
the testing and debugging of applications easier and more efficient. The emulator fully supports application
deployment, debugging, and application execution. It includes support for GPU emulation and orientation change.
XNA Game Studio - The XNA Game Studio is an integrated design environment that developers can use to build fun
and exciting games for Microsoft Windows, the Microsoft Xbox 360 video game and entertainment system,
Microsoft Zune, and Windows Phone. The XNA Framework is a managed-code class library that contains
functionality targeted specifically at game development tasks.
Samples, Documentation, Guides and Community - Documentation, How-to Guides, sample code, and sample
applications are provided to aid developers ramping up on Windows Phone development
CLOUD SERVICES
The Cloud Services are always on, are more scalable, can contain more functionality, and are not dependent on
battery life. Services built on Azure or third-party web services can be accessed to bring data to the phone.
Notifications - To enable efficient, dynamic, and up-to-date information and communication channels,
Windows Phone Application Platform provides an API to enable services to notify the user when relevant eventshave occurred. This eliminates the need for polling and reduces battery consumption.
Location Cloud Services - The Location Cloud Services will work together with the Location APIs on the phone,
making its presence transparent to the developer. The service will use Wi-Fi, cellular, and GPS data to provide a
single source for providing position lookup.
Identity, Feeds, Social, and Maps Services - The extensive variety of web services in the cloud allow consumers to
identify themselves, interact with social communities, receive data feeds, and use maps for navigation.
Windows Azure - Visual Studio 2010 provides the development environment for creating applications using the
Windows Azure Platform, an Internet-scale cloud computing and services platform hosted in Microsoft data
centers. The Windows Azure Platform provides a range of functionality to build applications that span from
consumer web to enterprise scenarios and includes a cloud operating system and a set of developer services.
Microsoft Advertising SDK for Windows Phone - Monetize your Windows Phone applications and games by including
ads from Microsoft Advertising.
PORTAL SERVICES
The Windows Phone Marketplace provides a centralized location for developers to submit and certify their
applications. Consumers have a centralized location from which to buy or update their applications.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
8/27
8
Registration and Validation - Developers can get started on App Hub by signing up with their Live ID.
Certification, Publishing, and Update Management - A set of tools will help the developer to submit and certify their
applications for the Windows Phone Marketplace. Applications are submitted in an .xap file format, which is
essentially one compressed file that contains all the files that are needed by the application.
Windows Phone Marketplace and Billing - The Windows Phone Marketplace provides the one place where
developers can make their applications available for purchase by consumers.
Business Intelligence - Business intelligence tools will provide developers with information reporting about their
application.
APPLICATION DEVELOPMENT LIFECYCLE
This section describes how developers can use the Windows Phone Application Platform from the beginning to the
end of the development cycle.
Getting Started With App Hub - App Hub will be the starting point for developers . Developers can begin by signing up
for a Windows Live ID. Developers can also register one or more phones for use as test hardware in validating the
applications that they are building. App Hub contains samples, documentation, and active developer communities
that help make Windows Phone developers successful.
Designing an Application and Producing an Application Package- The Visual Studio IDE is used to write managed
code defining the visual behavior of all Windows Phone applications. When the application is completed, a package
is created that includes everything the application needs.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
9/27
9
Debugging an Application - After an application has been completed, a developer can make the program available to
other users on the Windows Phone Marketplace. To publish to the Windows Phone Marketplace, developers submit
a .xap file. The .xap file that includes an application icon, a start tile, metadata, and licensing terms that determine
how their program can be used. The certification process will verify that the application is well-behaved, works for
the languages and markets indicated, and does not adversely affect the overall health of the phone. Once the
package has satisfied the Windows Phone Marketplace certification requirements, the developer is notified and can
publish the application to the Windows Phone Marketplace through App Hub.
Managing Published Applications - After a Windows Phone application is published to the Windows Phone
Marketplace, the developer uses App Hub to manage the versions of the application that are available for purchase.
APPLICATION BAR FOR WINDOWS PHONE
Pasted from
You can use the Windows Phone SDK to quickly and easily add an Application Bar to your application. The
Application Bar is a row of icon buttons along the bottom of the phones screen that provide users with quick access
to an applications most common tasks.
APPLICATION BAR USER INTERFACE
The default Application Bar is a row of icon buttons and an ellipsis along the bottom of the phones screen. The user
can click the ellipsis to display the labels for the icon buttons and menu items if they are enabled. The Application
Bar has built-in animation that is displayed as the menu is shown or hidden. Also, the Application Bar automatically
adjusts when the phone changes orientation.
Application Bar that uses the mini size.
Application Bar that uses the default size.
Application Bar after the user clicks the ellipsis. In this example, the menu items are unavailable.
MENU ITEMS
In addition to the icon buttons, you can add one or more text-based menu items. These items are displayed in a list
that slides up from underneath the icon buttons when the user clicks the ellipsis. The menu items are used for
application actions that are less frequently used, or for actions that are difficult to convey with only an icon. To
create a consistent user experience with the rest of the device, the text for menu items is automatically converted to
http://msdn.microsoft.com/en-us/library/ff431801(v=vs.92)http://msdn.microsoft.com/en-us/library/ff431801(v=vs.92)http://msdn.microsoft.com/en-us/library/ff431801(v=vs.92)http://msdn.microsoft.com/en-us/library/ff431801(v=vs.92) -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
10/27
10
all lowercase characters. The Application Bar menu is not hierarchical and the menu item list is not a submenu of any
of the icon buttons.
Application Bar after the user clicks the ellipsis. In this example, the menu items are enabled.
APPLICATION BAR DEVELOPMENT
The easiest way to create an Application Bar is by using XAML. The page templates that ship with the
Windows Phone SDK contain the XAML code for a sample Application Bar commented out. Uncomment the XAML to
create an Application Bar.
APPLICATION BAR PROPERTIES
This section describes the main properties of the Application Bar.
Mode: Specifies the size of the Application Bar when it first appears on a page, default or mini. This is also the size
that the Application Bar returns to after the user expands it and collapses it using the ellipsis.Opacity: The opacity of the Application Bar can be adjusted finely, but we recommend that you use only values of
0.0 (completely transparent, page is not resized), 0.5 (partially transparent, page is not resized), and 1.0 (completely
opaque, page is resized to the area of the screen not occupied by the Application Bar).
BackgroundColor: The background color of the Application Bar.
ForegroundColor: This is the color of the icon button labels, and the menu item text. If you use transparent icon
button images, this is also the color of the icon buttons.
IsMenuEnabled: Indicates whether the user can see the menu items when they expand the Application Bar.
IsVisible: Indicates whether the Application Bar is visible.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
11/27
11
APPLICATION BAR BEST PRACTICES
The following are best practices for using an Application Bar:
Use the Windows Phone Application Bar instead of creating your own menu system. Use the default system theme colors for the Application Bar unless there is a compelling reason to customize the
colors. Using custom colors for the Application Bar can affect the display quality of the button icons, can cause
unusual visual effects in menu animations, and can even influence power consumption on some display types.
Avoid using long text for menu items because the text will run off the screen. The recommended maximum length isbetween 14 and 20 characters.
Avoid using more than five menu items on an Application Bar because it will force the user to scroll.
CONTROLS FOR WINDOWS PHONE
BASE CONTROLS FOR WINDOWS PHONE
Pasted from
OVERVIEW
This section lists both the supported and unsupported Silverlight controls for Windows Phone.
SUPPORTED CONTROLS IN WINDOWS PHONE
The following Silverlight controls are supported in Windows Phone and are included in the System.Windows.Controls
Namespace in the .NET Framework Class Library for Silverlight.
Border: Draws a border, background, or both around another object. The example here shows a black
border with rounded corners.
Button: When you click a Button, it raises the Click event. The example here shows a button with the text
Button.
Canvas:A Canvas is one of the Panel elements that enable layout. Each child object is rendered within the
Canvas area. You control the positioning of objects inside the Canvas by specifying x and y coordinates.
These coordinates are in pixels. The x and y coordinates are often specified by using
the Canvas.Left and Canvas.Top attached properties. The example here shows a canvas with a black
background and a white rectangle contained within the canvas.
CheckBox: Represents a control that a user can select (check) or clear (uncheck). The example here shows
a checkbox with the label checkbox item in the checked state. Clicking the checkbox would uncheck the
checkbox and fire the Unchecked event.
N/A ContentControl: Represents a control with a single piece of content.
N/A ContentPresenter: Displays the content of a ContentPresenter.
N/A Control: Represents the base class for UI elements that use a ControlTemplate to define their
appearance.
http://msdn.microsoft.com/en-us/library/ff402549(v=vs.92)http://msdn.microsoft.com/en-us/library/ff402549(v=vs.92)http://msdn.microsoft.com/en-us/library/ff402549(v=vs.92)http://msdn.microsoft.com/en-us/library/ff402549(v=vs.92) -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
12/27
12
Grid: Defines a flexible grid area that consists of columns and rows. The example here shows a grid that
has three rows and two columns. Each cell in the grid contains a TextBlockcontrol whose text displays
the row and column coordinates of the cell. The gridlines shown here are displayed by
setting ShowGridlines = true for the grid.
HyperlinkButton: Represents a button control that displays a hyperlink. The example here shows
a HyperLinkButtonwith the text Click Me!.
Image: Represents a control that displays an image in the JPEG or PNG file format. The example here
shows an image that has been rendered by this control.
InkPresenter: Implements a rectangular surface that displays ink strokes. The example here shows some
hand-drawn ink strokes drawn on the control.
ListBox: Contains a list of selectable items. The example here shows a ListBox with three items labeled
item 0, item 1, item 2.
N/A MediaElement: Represents an object that contains audio, video, or both.
MessageBox: Displays a message to the user and optionally prompts for a response. The MessageBox
control is part of the System.Windows namespace. It is added here for convenience and because it is an
important user interface element.
N/A MultiScaleImage: Enables users to open a multi-resolution image, which can be zoomed in on and
panned across.
N/A Panel: Provides a base class for all Panel elements. Use Panel elements to position and arrange child
objects in Silverlight-based applications
PasswordBox: Represents a control for entering passwords. The example here shows text entered in the
PasswordBox and displayed as password characters, obscuring what was entered.
ProgressBar: Represents a control that indicates the progress of an operation. The example here shows
a ProgressBar with IsIndeterminate = true, which reports generic progress with a repeating
pattern.
RadioButton: Represents a button that allows a user to select a single option from a group of options.
This example shows two RadioButtoncontrols titled option 0 and option 1 with the second option
selected.
RichTextBox: Represents a rich text editing control that supports formatted text, hyperlinks, inline
images, and other rich content.
N/A ScrollViewer: Represents a scrollable area that can contain other visible elements.
Slider: Represents a control that lets the user select from a range of values by moving a Thumb control
along a track. This example shows a Slider control with a value set.
StackPanel: Arranges child elements into a single line that can be oriented horizontally or vertically. The
example here shows two RadioButtoncontrols contained within a StackPanel. The StackPanel default
orientation, shown here, is vertical. Children can also be stacked horizontally.
TextBlock: Provides a lightweight control for displaying small amounts of text. The example here shows a
line of text.
TextBox: Represents a control that can be used to display single-format, multi-line text. The example
here shows multiple lines of generic text.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
13/27
13
N/A UserControl: Provides the base class for defining a new control that encapsulates related existing
controls and provides its own logic.
The following controls are supported in Windows Phone and are included in the
Microsoft.Phone.Controls namespace.
PHONEAPPLICATIONFRAME
Windows Phone applications are based on a Silverlight page model in which users can navigate forward through
different screens of content. The core elements include a top-level container control
called PhoneApplicationFrame that can host a PhoneApplicationPage control.
A PhoneApplicationFrame integrates with the Windows Phone look and feel so that it appears like any other application.
Only a single frame is available to the application with no exceptions. A frame includes the following characteristics:
Exposes the screen orientation property Exposes a client area where pages are rendered Reserves space for the status bar and application bar
Note: Windows Phone applications do not support nested frames in this release.
PHONEAPPLICATIONPAGE
Pages hold discrete sections of content in your application. You can create as many different pages as needed to
present the content in your application and then navigate to those pages from the frame.
A page fills the entire content region of the frame. A page optionally surfaces its own Application Bar.
SILVERLIGHT FOR WINDOWS PHONE TOOLKIT CONTROLS
Silverlight for Windows Phone Toolkit offers developers additional controls for Windows Phone application
development, designed to match the rich user experience of the Windows Phone.
AutoCompleteBox ContextMenu DatePicker Gestures ListPicker LongListSelector
PerformanceProgressBar TiltEffect TimePicker ToggleSwitch Page Transitions WrapPanel
UNSUPPORTED CONTROLS
The following Silverlight controls are not supported in Windows Phone:
ComboBox ** TreeView **** OpenFileDialog *** DatePicker - available in the WP Toolkit ToolTip *
Calendar **** DataGrid **** TabControl **** Frame use PhoneApplicationFrame class. SaveFileDialog ***
GridSplitter **** Label **** ScrollBar * Page use PhoneApplicationPage class.
* not suitable controls to use in a touch-based system
** not themed to the Windows Phone design*** use isolated storage in your application.
**** controls from the Silverlight 3.0 platform and cannot be used.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
14/27
14
PANORAMA CONTROL FOR WINDOWS PHONE
Unlike standard applications that are designed to fit within the confines of the phone screen, panoramic applications
offer a unique way to view controls, data, and services by using a long horizontal canvas that extends beyond the
confines of the screen. These inherently dynamic views use layered animations and content so that layers smoothly
pan at different speeds, similar to parallax effects.
At the base of the application is thePanoramacontrol that is essentially a long horizontal canvas. A secondary control
called aPanoramaItemserves as a container that hosts other content and controls such as links, grids, and lists.
The content of panoramic applications can vary:
Casual browsing back and forth where the user is encouraged to explore content in a non-task-directed way. More data-dense information Hubs where the user can achieve more conscious goals like looking for a specific
contact or game to play.
The People and Pictures Hubs illustrate the look and feel of a panorama application.
The panorama experience supports the following gestures and navigational effects:
Horizontal pan (tap and drag left/right) Horizontal flick (tap and swipe quickly left/right) Navigating hosted controlsfor example, links can be tapped and lists can be scrolled
http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.panorama(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.panorama(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.panorama(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.panoramaitem(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.panoramaitem(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.panoramaitem(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.panoramaitem(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.panorama(v=vs.92) -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
15/27
15
Note: In the preceding illustrations, when you are positioned on a particular content section, you will have a 24 pixel
preview of the next section visible on the screen. This serves as a type of visual hint that there is additional content available.
PANORAMA CONTROL
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
16/27
16
The Panorama control is the base control for a panorama application and comprises three different layers. Each layer
is contained within a Grid control that serves as the layout root for the Panorama control.
Layer Type Description
Background PanningBackgroundLayer The panel that is used to display and animate the background.
Title PanningTitleLayer The panel that is used to display and animate the title.
Items PanningLayer The layer that displays the PanoramaItem controls.
PanoramaItem Control
PanoramaItem controls are individual sections of content that are added to a Panorama control. A Panorama control
can support multiple PanoramaItem controls and the user can navigate through these sections using supported
touch gestures. The PanoramaItem control itself comprises two elements. Each element is contained within a
Grid that serves as the layout root for the PanoramaItem control.
Elements Type Description
Header ContentControl The ContentControl that is used to display and animate the header. This header
is optional. If it is not specified the space should not be reserved and collapsed.
Content ContentPresenter The ContentPresenter that displays the PanoramaItem content.
PANORAMA BEST PRACTICES
PANORAMA ITEMS
Ensure panoramic applications perform smoothly by limiting the number of sections used to a maximum of foursections. If your content is dense, or if many of your sections share multiple hosted controls, then you should use even
fewer sections.
Consider hiding panorama sections until they have content to display. Navigation should function as if the hiddensections do not exist, making the effective horizontal navigable width smaller.
Sections can extend beyond the screen boundaries, reinforcing the panoramic nature of the control. This effect can beachieved by setting the PanoramaItem control orientation property to horizontal.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
17/27
17
BACKGROUND
Use either a single-color background or an image that spans the entire Panorama control. Use a properly sized image in your application. Background images should be between 480 x 800 pixels and
1024 x 800 pixels (width x height) to ensure good performance, minimal load time, and no scaling. If your image does
not have a height of 800 pixels, it will be stretched to that height without preserving the aspect ratio.
Avoid using drop-shadow effects on elements of the UI that are dynamic. Animations are not supported in the background ofPanorama controls. Do not use a Storyboard element in the
background of a Panorama control.
TITLE
Ensure that the font or image color works across the entire background and that the panorama title is not dependenton the background image for visibility.
Use the same title that is used for the launch tile in Start for the panorama title for consistency. Avoid animating the panorama title or dynamically changing its size.
OTHER RESOURCES
Panorama Control Design Guidelines for Windows Phone
Pasted from
PIVOT CONTROL FOR WINDOWS PHONE
A Windows Phone pivot application provides a quick way to manage views or pages. It can be used for filtering large
datasets, viewing multiple data sets, or switching application views. For example, flicking or panning left to right on
the page advances to the next page of content.
At the base of an application is aPivotcontrol that is essentially a container for a secondary control called
aPivotItemcontrol. The PivotItem controls contain individual page content such as controls, grids, or links inside
each page.
http://msdn.microsoft.com/en-us/library/hh202912(v=vs.92)http://msdn.microsoft.com/en-us/library/hh202912(v=vs.92)http://msdn.microsoft.com/en-us/library/ff941107(v=vs.92)http://msdn.microsoft.com/en-us/library/ff941107(v=vs.92)http://msdn.microsoft.com/en-us/library/ff941107(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.pivot(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.pivot(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.pivot(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.pivotitem(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.pivotitem(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.pivotitem(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.pivotitem(v=vs.92)http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.pivot(v=vs.92)http://msdn.microsoft.com/en-us/library/ff941107(v=vs.92)http://msdn.microsoft.com/en-us/library/hh202912(v=vs.92) -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
18/27
18
The Pivot control comes with built-in support for touch interaction and navigation. You do not have to implement any
special gesture functionality in your application because it is enabled by default. The pivot control supports the
following gestures and navigational effects:
Horizontal pan (tap and drag left/right) Horizontal flick (tap and swipe quickly left/right) Navigating hosted controlsfor example, links can be tapped and lists can be scrolled
PIVOT CONTROL
The Pivot control is the base control for a pivot application and comprises two different layers. Each layer is
contained within a Grid control that serves as the layout root for the Pivot control.
Layer Type Description
Headers List Element PivotHeadersControl The element responsible for displaying the headers for pivot items.
Pivot Item Presenter ItemsPresenter The ItemsPresenter control that displays a single PivotItem control
from the set.
PIVOTITEM CONTROL
The PivotItem control displays the content within an individual viewing page. PivotItem controls are defined in XAML
as a standard ItemsControl element. The PivotItemcontrol contains a single layer contained in a Grid control that
serves as the layout root for the Pivot control.
Layer Type Description
Content ContentPresenter The ContentPresenter control that displays the PivotItem content.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
19/27
19
PIVOT CONTROL BEST PRACTICES
Minimize the number ofPivot control pages when possible for performance considerations. Improve the performance of the pivot application by loading Pivot control content on-demand as opposed to loading
everything at startup. One solution is to take the content from each PivotItem control and convert into UserControls.
You can then subscribe to the LoadingPivotItem event on the root pivot control. Next, in the event handler,
instantiate the proper UserControl and set it as the PivotItem content.
Ensure that the pivot application is used to display only items or data of similar type. Otherwise, you run the possibilityof creating an unsettled, jarring experience for the end user.
Pivot controls should be used sparingly and limited to scenarios where it is appropriate for the experience. An empty pivot page should be removed only when there is no chance that additional information can be added
through user action.
LOCATION FOR WINDOWS PHONEPasted from
The Microsoft Location Service allows you to create location-aware applications for Windows Phone. The service
obtains location data from multiple sources such as GPS, Wi-Fi, and cellular. It can use one or more of these sources
to deduce the location of the Windows Phone, balancing performance with power utilization depending on an
applications needs. The location is exposed to applications through an event-driven managed code interface.
LOCATION SERVICE ARCHITECTUREThe first layer consists of hardware in the Windows Phone device. This includes the GPS receiver, Wi-Fi, and the
cellular radio. These can all function as providers of location data with varying levels of accuracy and power
consumption. On top of the hardware sits the native code layer. This layer communicates directly with the available
sources of location data and decides which sources to use to determine the location of the device based on the
availability of data and on the performance requirements specified by the application. The native code layer also
communicates over the Internet with a Microsoft-hosted web service to look up location-related information from a
database. The top layer of the Location Service is the managed interface, exposed through a DLL that is included with
Windows Phone SDK. An application uses this interface to start and stop the location service, to set the level of
accuracy required by the application, and to receive location data from the native code layer as it becomes available.
http://msdn.microsoft.com/en-us/library/ff431800(v=vs.92)http://msdn.microsoft.com/en-us/library/ff431800(v=vs.92)http://msdn.microsoft.com/en-us/library/ff431800(v=vs.92)http://msdn.microsoft.com/en-us/library/ff431800(v=vs.92) -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
20/27
20
PUSH NOTIFICATIONS FOR WINDOWS PHONEPasted from
The Microsoft Push Notification Service in Windows Phone offers third-party developers a resilient, dedicated, and
persistent channel to send data to a Windows Phone application from a web service in a power-efficient way.
(1) Your client application running on the phone requests a push notification URI from the Push client service.
(2 and 3) The Push client service then negotiates with the Microsoft Push Notification Service (MPNS) and returns a
notification URI to your client application.
(4) Your client application can then send the URI to your cloud service (4).
(5) When your web service has information to send to your client application, it uses the URI in sending a push notification to
the Microsoft Push Notification Service.(6) MPNS in turn routes the push notification to the application running on a Windows Phone device.
Depending on the format of the push notification and the payload attached to it, the information is delivered as raw data to
the application, the application's Tile is visually updated, or a toast notification is displayed.
The Microsoft Push Notification Service sends a response code to your web service after a push notification is sent indicating
that the notification has been received and will be delivered to the device at the next possible opportunity. However, the
Microsoft Push Notification Service does not provide an end-to-end confirmation that your push notification was delivered
from your web service to the device.
http://msdn.microsoft.com/en-us/library/ff402537(v=vs.92)http://msdn.microsoft.com/en-us/library/ff402537(v=vs.92)http://msdn.microsoft.com/en-us/library/ff402537(v=vs.92)http://msdn.microsoft.com/en-us/library/ff402537(v=vs.92) -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
21/27
21
TYPES OF NOTIFICATIONS
TOAST NOTIFICATIONS
A toast notification is displayed at the top of the screen to notify users of an event, such as a news or weather alert.
The toast displays for about 10 seconds unless the user dismisses it with a flick to the right. If the user taps the toast,
the application that sent the toast notification is launched.
The elements of a toast notification are: Title. A boldface string that displays immediately after the application icon. This is defined as the Text1 property
in the XML schema.
Content. A non-boldface string that displays immediately after the Title. This is defined as the Text2 property inthe XML schema.
Parameter. A parameter value that is not displayed but passed to your application if the user taps on the toast.This parameter can indicate what page the application should launch to. It can also contain name-value pairs to
pass to the application. This is defined as the Param property in the XML schema.
TILE NOTIFICATIONS
A Tile notification can be used to update a Tile on Start. These properties on the front of a Tile can be updated using
a Tile notification.
Title. A string indicating the title of the application. The Title must fit on a single line of text and should not bewider than the actual Tile. Approximately 15 characters will fit in the title before being truncated.
BackgroundImage. An image displayed on the front of the Tile. We recommend that you always have abackground image on the front of the Tile.
Count (also known as Badge) . An integer value from 1 to 99. If the value of Count is not set or it is set to 0, thecircle image and value will not display in the Tile.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
22/27
22
These properties on the back of a Tile can be updated using a Tile notification.
BackTitle. A string displayed at the bottom of the back of a Tile. The BackTitle must fit on a single line of textand should not be wider than the actual Tile. Approximately 15 characters will fit in the title before being
truncated.
BackBackgroundImage. An image displayed on the back of the Tile.
BackContent. A string displayed in the body of the back of a Tile. Approximately 40 characters will fit in the Tilebefore being truncated.
RAW NOTIFICATIONS
You can use a raw notification to send information to your application. If your application is not currently running,
the raw notification is discarded on the Microsoft Push Notification Service and is not delivered to the device.
Pasted from
HARDWARE SPECIFICATIONS FOR WINDOWS PHONE
Pasted from
STANDARD HARDWARE
A common set of hardware controls and buttons that include the Start, Search, and Back buttons. A large WVGA (800 x 480) format display capable of rendering most web content in full-page width and displaying
movies in widescreen.
Capacitive 4-point multi-touch screens for quick, simple control of the phone and its features. Support for data connectivity using cellular networks and Wi-Fi. 256 MB (or more) of RAM and 8 GB (or more) of flash storage. A-GPS Accelerometer
OPTIONAL HARDWARE
Compass Gyro Primary Camera Front-facing Camera
http://msdn.microsoft.com/en-us/library/ff402558(v=vs.92)http://msdn.microsoft.com/en-us/library/ff402558(v=vs.92)http://msdn.microsoft.com/en-us/library/ff402558(v=vs.92)http://msdn.microsoft.com/en-us/library/ff637514(v=vs.92)http://msdn.microsoft.com/en-us/library/ff637514(v=vs.92)http://msdn.microsoft.com/en-us/library/ff637514(v=vs.92)http://msdn.microsoft.com/en-us/library/ff637514(v=vs.92)http://msdn.microsoft.com/en-us/library/ff402558(v=vs.92) -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
23/27
23
APPLICATION MANIFEST FILE FOR WINDOWS PHONEPasted from
Each Windows Phone application has a manifest file that contains details about the application, such as the App ID
and the capabilities that the application uses. This topic defines the elements, tags, and attributes in the application
manifest file. The manifest file is called WMAppManifest.xml, and you can find it in the Properties folder of your
project in the Solution Explorer window in Visual Studio, or by using Windows Explorer.
The primary purpose of the manifest file is the following:
When you submit your applications to the Windows Phone Marketplace, information from the manifest file is used inthe certification process, to filter your application correctly in the Windows Phone Marketplace, and to deploy and run
your application on physical devices.
The information from the manifest file is stored as metadata in the application database.
ApplicationIcon.png
Background.png
0
PanoramaApp1
http://msdn.microsoft.com/en-us/library/ff769509(v=vs.92).aspxhttp://msdn.microsoft.com/en-us/library/ff769509(v=vs.92).aspxhttp://msdn.microsoft.com/en-us/library/ff769509(v=vs.92).aspxhttp://msdn.microsoft.com/en-us/library/ff769509(v=vs.92).aspx -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
24/27
24
DEPLOYMENTELEMENT
Attribute Type Definition
xmlns String The XML namespace. The default value is
http://schemas.microsoft.com/windowsphone/2009/deployment
AppPlatformVersion String The version of the Windows Phone SDK or the runtime binaries of the platform. The
default value is 7.1.
APPELEMENT
Attribute Type Definition
Author String The application authors name.
BitsPerPixel Integer 16 or 32 bits per pixel.
Description String The description of the application.
Genre String The default value is either Apps.Normal or Apps.Game depending on the project
type.
Applications that use Apps.Normal appear in the application list on the phone.
Applications that useApps.Games appear in the Games Hub on the phone.
HasSettings Boolean Indicates whether the application supports settings.
HubType Integer Enables your application to appear in the Extras section of the Music + Videos Hub. It
is used for testing before application submission, and must be manually entered in the
manifest file. A value of 1 enables this functionality.
IsBeta Boolean Indicates whether the application is a beta application. This has consequences for the
application license.
ProductID GUID The default value is the GUID for the project (128 bit). During the application
submission process, a new product ID is inserted into the manifest file.
Publisher String The publisher of the application. This default value is the name of the project. This
attribute is required for certain types of applications, such as push-enabled
applications.
RuntimeType String The default value is Silverlight or XNA depending on the project type.
SingleInstanceHost Boolean Indicates whether the application has a single instance host.
Title String The title of the application that appears in the Application list or Games Hub. The
default value is the name of the project.
Version Version
String
The default value is 1.0.0.0.
xmlns String You can leave this value blank.
http://schemas.microsoft.com/windowsphone/2009/deploymenthttp://schemas.microsoft.com/windowsphone/2009/deploymenthttp://schemas.microsoft.com/windowsphone/2009/deployment -
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
25/27
25
ICONPATHELEMENT
It provides the location of the application icon that is visible in the application list. The default image is
ApplicationIcon.png for Silverlight projects and PhoneGameThumb.png for XNA Framework games. The attributes
are for internal use only.
CAPABILITIES ELEMENT
The primary goals of this capability model are to: Ensure proper disclosure Users must be notified if an applications functionality poses security risks. They must opt-
in to allow the functionality to be activated.
Decrease the attack surface Capabilities are used to create a security chamber in which the application executes. Thischamber is created once at install time and used from then on for the application. The following tables highlight the
currently supported capabilities and their descriptions.
CAPABILITY ELEMENT
Value Type Description
ID_CAP_APPOINTMENTS String Applications that access appointment data.
ID_CAP_CAMERA String Applications that use the camera capabilities. This value is for use by
Mobile Operators and Original Equipment Manufacturers only. Application
developers use ID_CAP_ISV_CAMERA instead.
ID_CAP_CONTACTS String Applications that access contact data.
ID_CAP_GAMERSERVICES String Applications that can interact with Xbox LIVE APIs. This must be disclosed
due to privacy issues since data is shared with Xbox.
ID_CAP_IDENTITY_DEVICE String Applications that use device-specific information such as a unique device
ID, manufacturer name, or model name.
ID_CAP_IDENTITY_USER String Applications that use the anonymous LiveID to uniquely identify the user in
an anonymous fashion.
ID_CAP_ISV_CAMERA String Applications that use the primary or front-facing camera.
ID_CAP_LOCATION String Applications with access to location services.
ID_CAP_MEDIALIB String Applications that can access the media library.
ID_CAP_MICROPHONE String Applications that use the microphone. The application can record without a
visual indication that recording is taking place.
ID_CAP_NETWORKING String Applications with access to network services. This must be disclosed
because services can incur charges when a phone is roaming.
ID_CAP_PHONEDIALER String Applications that can place phone calls. This may happen without a visual
indication for the end user.
ID_CAP_PUSH_NOTIFICATION String Applications that can receive push notifications from an Internet service.
This must be disclosed because usage could incur roaming charges.
ID_CAP_SENSORS String Applications that use the Windows Phone sensors.
ID_CAP_WEBBROWSERCOMPONENT String Applications that use the web browser component. There are security risks
with scripting.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
26/27
26
ID_HW_FRONTCAMERA String Applications that have features which require the front-facing camera. If a
front-facing camera is not present on the users device, Marketplace warns
the user that some features of the application might not work because
their phone does not have a front-facing camera. This capability is not
required to use the front-facing camera; it is only used to trigger the said
warning when applicable.
REQUIREMENTS ELEMENT
Beginning in Windows Phone SDK 7.1.1 Update, use the REQUIREMENTS element to indicate if the application
requires certain hardware. For example, if the application will not run on a 256-MB device, you should specify it in
this section. The primary goal of this element is to block users from purchasing or installing applications that will not
run on their device.
A REQUIREMENTS element is not required in your manifest file if the application can run on 256-MB devices and
there are no other special hardware requirements
REQUIREMENT ELEMENT
Value Description
ID_REQ_MEMORY_90 Indicates the application requires more than 90 MB of memory and is not suited for a 256-MB
device.
TASKSELEMENT
The TASKS element is a child of the APP element. This element is for internal use only.
Attribute Type Description
Name String The name of the task. The default value is _default.
NavigationPage String The page in the application that a task navigates to when it starts.
TOKENSELEMENT
Each application has a Tile that the user can pin to the Start screen. The following sections provide the names anddescribe the elements and attributes for Tiles in the manifest file.
PRIMARYTOKEN ELEMENT
It describes the Tile that is associated with an application.
Attribute Type Description
TokenID String The name of the Tile. The default value is the project name.
Caution: If you change the TokenID of your primary token, it should not match the TokenID of any
of your secondary Tiles. In that case, users may not be able to install updates to the application.
TaskName String The name of the task that the Tile invokes when the user taps it. The default value is _default.
-
7/30/2019 Aplicaes e Desenvolvimento para Mobile - Revises de WP7.pdf
27/27
TEMPLATETYPE5 ELEMENT
The TEMPLATETYPE5 element is a child of the PRIMARYTOKEN element. It is the default template that controls
application Tiles.
Element Type Description
BACKGROUNDIMAGEURI String The name of the local or remote resource that contains the background image of
the Tile.
COUNT Integer A Tile can contain a counter that displays a value between 0 and 99. If the value is
0, the counter does not appear on the Tile.
TITLE String The title that appears on the Tile. The default value is the name of the project.
EXTENSIONS ELEMENT
The EXTENSIONS element is a child of the APP element. This element is used to specify the extensions that yourapplication supports.
EXTENSIONELEMENT
Attribute Type Description
ConsumerID GUID Restricts access to the extension to the consumer with the specified ProductID. All search
extensions require the same value, 5B04B775-356B-4AA0-AAF8-6491FFEA5661 .
ExtensionName String Identifier for the type of extension support.
ExtraFile String Specifies the location of the Extras.xml file. The file must reside in a folder named Extensions
and be named Extras.xml.
TaskID String Routes the invocation to the specified TaskID. If this attribute is not specified, invocation is
routed to the default task.
top related