Top Banner
Programering af mobile enheder Windows Phone Uge 9 Part 1
20

Programering af mobile enheder Windows Phone

Jan 03, 2016

Download

Documents

sloane-cannon

Programering af mobile enheder Windows Phone. Uge 9 Part 1. Windows Phone udvikling. Centrale opstarts links for at komme igang : Links om Windows Phone 7 udviklings værktøjer - gratis: Windows Phone developer Center Microsoft Press ebook : Programming Windows Phone 7 (1013 sider) - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Programering  af mobile enheder Windows Phone

Programering af mobile enheder

Windows Phone

Uge 9

Part 1

Page 2: Programering  af mobile enheder Windows Phone

Windows Phone udvikling

Centrale opstarts links for at komme igang:

Links om Windows Phone 7 udviklings værktøjer - gratis:

• Windows Phone developer Center

• Microsoft Press ebook: Programming Windows Phone 7 (1013 sider)

• Windows Phone 7.5 Training Kit

• codeplex: The Windows Phone Toolkit

• Windows Phone development quickstarts - channel 9

• Se desuden fronter materiale mappe

Page 3: Programering  af mobile enheder Windows Phone

Design Resources for Windows Phone

Application Bar Icons for Windows Phone 7These icons are now installed locally as a part of the Windows Phone Developer Tools. You can find these icons on your computer after you have installed Windows Phone Developer Tools at the following locations: 32-bit computers - C:\Program Files\Microsoft SDKs\Windows Phone\v7.0\Icons64-bit computers - C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Icons

UI Design and Interaction Guide for Windows Phone 7Windows Phone introduces a touch user interface (UI) based on a design system codenamed Metro. This guide provides detailed information about UI elements and controls, UI system behaviors, and the interaction model for the touch interface. Designers and developers should read this guide to learn the dos and don’ts of UI implementations for their Windows Phone applications.

Microsoft Expression Blend for Windows PhoneExpression Blend for Windows Phone is installed as a stand-alone application with the Windows Phone Developer Tools and enables you to create Windows Phone applications using built-in templates. These templates enable you to preview application styles, set the theme, customize the application bar, define page navigation, optimize text input scopes, and select keyboards.

Design Templates for Windows Phone 7A collection of 28 layered Photoshop template files that can be used to create pixel-perfect application layouts, to help guide UI development, or to pitch an idea. These design templates showcase many controls that are a part of the Windows Phone Developer Tools. They also include examples of controls that are a part of Windows Phone, but are not available as a part of the Windows Phone Developer Tools. These additional templates are included to help designers and developers maintain a consistent look and feel across applications for system controls that developers wish to mimic.

http://msdn.microsoft.com/en-us/library/windowsphone/design/ff637515(v=vs.105).aspx

Page 4: Programering  af mobile enheder Windows Phone

Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)

Page 5: Programering  af mobile enheder Windows Phone

Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)

Page 6: Programering  af mobile enheder Windows Phone

Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)

Page 7: Programering  af mobile enheder Windows Phone

Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)

Page 8: Programering  af mobile enheder Windows Phone

Application Platform Overview for Windows Phone

http://msdn.microsoft.com/en-us/library/ff402531(v=VS.92).aspx

Page 9: Programering  af mobile enheder Windows Phone

Application Platform Overview for Windows Phone Framework

http://msdn.microsoft.com/en-us/library/ff402531(v=VS.92).aspx

Page 10: Programering  af mobile enheder Windows Phone

frames and pageshttp://create.msdn.com/en-US/education/quickstarts/Navigation

The navigation experience in Windows Phone is similar to the navigation experience in Silverlight, but it has been extended to accommodate phone-specific features.

The navigation model in Windows Phone is based on one PhoneApplicationFramecontrol. PhoneApplicationFrame contains one or more PhoneApplicationPage controls that users can navigate through.PhoneApplicationFrame is the main navigation control and supports navigation to and from pages. PhoneApplicationPageencapsulates content that can be navigated to by PhoneApplicationFrame.

Page 11: Programering  af mobile enheder Windows Phone

navigating between pages

The easiest way to perform page navigation is by using a HyperlinkButton control. You can use its NavigationUri property to navigate to a page. The following example shows how to navigate to a page named SecondPage.xaml.XAML

<HyperlinkButton NavigateUri="SecondPage.xaml" />

If you don't want to use a HyperlinkButton, you can perform navigation by using the NavigationService class. This class contains several properties, methods, and events to help you with navigation.

You can use the NavigationService.Navigate method to navigate to a specific page.

Page 12: Programering  af mobile enheder Windows Phone

Sources of DataData can exist in several locations. For example, read-only data can be stored in a local file within your applications. User-specific data can be stored locally in an area called isolated storage. Data can be stored on the Internet, which can be accessed through web services.

http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402541(v=vs.105).aspx

Page 13: Programering  af mobile enheder Windows Phone

Windows Phone

Execution Model

Page 14: Programering  af mobile enheder Windows Phone

TerminologiTerm Definition

Tombstoning The procedure in which the operating system terminates an application’s process when the user navigates away from the application. The operating system maintains state information about the application. If the user navigates back to the application, the operating system restarts the application process and passes the state data back to the application.

Page state The visual state of an application page. This includes such things as the scroll position of a ScrollViewer control and the contents of TextBox controls. Manage page state in the OnNavigatedTo and OnNavigatedFrom event handlers.

Application state The state of the application that is not associated with a specific page. Application state is managed in the events exposed by the PhoneApplicationService class.

Persistent data Data that is shared by all instances of an application. Persistent data is saved and loaded from isolated storage. Application settings are an example of persistent data that should be preserved between application executions.

Transient state Data that describes the state of a single instance of an application. Transient data is stored in the State dictionary provided by the PhoneApplicationService class. A tombstoned application restores its transient state when it is activated. An example of transient state is the data returned by a Web service query. This can be stored when an application is tombstoned to reduce the need to perform the query again if the user quickly returns to the application.

Some of the terms that are used to describe the Windows Phone execution model.

 

Page 15: Programering  af mobile enheder Windows Phone

Execution Model Overview for Windows Phone

Life Cycle of an ApplicationMere her:http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff817008(v=vs.105).aspx

Page 16: Programering  af mobile enheder Windows Phone

Application TombstonedWhat Causes an Application To Be Tombstoned?This section lists all of the actions that can cause an application to be deactivated and tombstoned.

User Actions•The following user actions may cause an application to be deactivated and tombstoned.•The user navigates away from your application by pressing the Start button.•The user stops interacting with the application and the phone’s lock screen engages. This behavior can be modified. For more information, see Idle Detection for Windows Phone.

Launchers and Choosers That Typically Do Not Cause an Application to be TombstonedIn order to improve performance around several common user scenarios, the following Launchers and Choosers will typically not cause your application to be tombstoned. However, it is still possible that your application will be tombstoned when using these, so your application should be designed to handle this possibility. Se her: http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff769543(v=vs.105).aspx

•PhotoChooserTask •CameraCaptureTask •MediaPlayerLauncher •EmailAddressChooserTask •PhoneNumberChooserTask

Page 17: Programering  af mobile enheder Windows Phone

Execution Model Best Practices for Windows Phone

Se http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff817009(v=vs.105).aspx

Herunder hvordan man gemmer og reetablere state:• PhoneApplicationService.State• PhoneApplicationPage.State

Dictionary objekter som anvendes svarende lidt til Application og ViewState klasser i ASP.NET

Page 18: Programering  af mobile enheder Windows Phone

Start på udviklingCentrale opstarts links for at komme igang:• Windows Phone development quickstarts - channel 9

http://channel9.msdn.com/coding4fun/blog/Windows-Phone-7-Development-QuickStarts

• Create Your First Silverlight Application for Windows Phonehttp://msdn.microsoft.com/en-us/library/ff402526(v=VS.92).aspx

• Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)http://msdn.microsoft.com/da-dk/gg241260

• Application Platform Overview for Windows Phonehttp://msdn.microsoft.com/en-us/library/ff402531(v=VS.92).aspx

• Windows Phone 7 Training Course http://msdn.microsoft.com/en-us/gg266499

Page 19: Programering  af mobile enheder Windows Phone

Flere links om Windows Phone 7Silverlight udvikling

Windows Phone 7.5 Training Kit

http://www.microsoft.com/en-us/download/confirmation.aspx?id=28564

http://developer.nokia.com/

The Windows Phone Toolkit

http://phone.codeplex.com/

Data for Windows Phone

http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402541(v=vs.105).aspx

Local database for Windows Phone

http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202860(v=vs.105).aspx

Quickstart: Working with settings in Windows Phone

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj714090(v=vs.105).aspx

SQLite for Windows Phone

http://visualstudiogallery.msdn.microsoft.com/cd120b42-30f4-446e-8287-45387a4f40b7

http://www.codeguru.com/csharp/.net/wp7/using-sqlite-in-your-windows-phone-application.htm

http://sqlitewindowsphone.codeplex.com/releases

http://dotnetslackers.com/articles/silverlight/Windows-Phone-7-Native-Database-Programming-via-Sqlite-Client-for-Windows-Phone.aspx#s2-introduction-to-sqlite-client-for-windows-phone

Local database for Windows Phone med LINQ to SQL

http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202860(v=vs.105).aspx

 

Page 20: Programering  af mobile enheder Windows Phone

Flere links om Windows Phone 7Silverlight udvikling

Flere links fra tidligere – der dog ikke er testet for døde / ændret

• App Hub - windows phone development quickstarts

• Windows Phone Development

• Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)

• Windows Phone How Do I Videos MSDN

• Differences Between Silverlight and Silverlight for Windows Phone (Tekst)

• App Hub - getting data into your windows phone applications

• App Hub - navigation - silverlight quickstart for windows phone development

 

• Brugbar?? Getting Started with Silverlight and Windows Phone 7 Development