Programering af mobile enheder Windows Phone Uge 9

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)
Windows Phone 7.5 Training Kit
codeplex: The Windows Phone Toolkit
•
Windows Phone development quickstarts - channel 9
•
Se desuden fronter materiale mappe
Design Resources for Windows Phone
http://msdn.microsoft.com/en-us/library/windowsphone/design/ff637515(v=vs.105).aspx
Application Bar Icons for Windows Phone 7
These 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\Icons
64-bit computers - C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Icons
UI Design and Interaction Guide for Windows Phone 7
Windows 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 Phone
Expression 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 7
A 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.
Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)
Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)
Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)
Windows Phone 7 in 7 Silverlight and Windows Phone 7 (Video intro)
Application Platform Overview for
Windows Phone
http://msdn.microsoft.com/en-us/library/ff402531(v=VS.92).aspx
Application Platform Overview for Windows Phone
Framework
http://msdn.microsoft.com/en-us/library/ff402531(v=VS.92).aspx
frames and pages
http://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. PhoneApplicationF
rame 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.
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.
Sources of Data
Data 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
Windows Phone
Execution Model
Terminologi
Term
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.
Execution Model Overview for
Windows Phone
Life Cycle of an Application
Mere her:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff817008(v=vs.105).aspx
Application Tombstoned
What 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 Tombstoned
In 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
Execution Model
Best Practices for Windows Phone
Se http://msdn.microsoft.com/enus/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
Start på udvikling
Centrale 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 Phone
http://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 Phone
http://msdn.microsoft.com/en-us/library/ff402531(v=VS.92).aspx
• Windows Phone 7 Training Course
http://msdn.microsoft.com/en-us/gg266499
Flere links om Windows Phone 7
Silverlight 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#s2introduction-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
Flere links om Windows Phone 7
Silverlight 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