wp7_tpa_1_silverlight
TRANSCRIPT
-
8/2/2019 WP7_tpa_1_silverlight
1/25
TPA - Windows Phone
Silverlight introduction
Prepared by: Kamil Kowalski
-
8/2/2019 WP7_tpa_1_silverlight
2/25
Agenda
Course plan
Your projects
WP7 Architecture
Silver light development
Visual Studio for WP - basic
First project
Silverlight real project
-
8/2/2019 WP7_tpa_1_silverlight
3/25
Course plan
Silverlight for WP - introduction
Step by step: Silverlight first application
XNA for WP - introduction
Step by step: simple XNA game
Controls & styles definitions
Pivot & Panorama
Application Bar
Application life cycle Tombstoning
Data Binding and MVVM
Isolated storage
Calendar, Contacts, Alarms
Launchers & Choosers
Notifications / remainders
Location and Bing map
-
8/2/2019 WP7_tpa_1_silverlight
4/25
Development options
Sensors Media Data
Xbox LIVE Notifications
.NET Framework managed code sandbox
Location
Phone
Phone Emulator
Samples Documentation
Guides Community
Packaging and Verification Tools
Runtime Tools
Cloud Portal
Notifications
Location Identity Feeds
MapsSocial
App Deployment Registration
Validation
Certification
Publishing
Marketplace
MO and CC Billing
Business Intelligence
Update Management
-
8/2/2019 WP7_tpa_1_silverlight
5/25
WP7 Architecture
-
8/2/2019 WP7_tpa_1_silverlight
6/25
Silverlight
Silverlight is a subset of Windows Presentation
Foundation (WPF)
Originally thought of as means to create a single
application that can be run both on Web and ondesktop
Silverlight can be thought of having design files
(XAML) and data files (C#)
-
8/2/2019 WP7_tpa_1_silverlight
7/25
Silverlight
Silverlight
WP7 supports Silverlight version 3+ (4+ from Mango)
+ => access to WP7 features, including location, sensors, camera
etc.
Applications are created using a combination of
XAML and C#
-
8/2/2019 WP7_tpa_1_silverlight
8/25
Silverlight for WP
Inputs Keyboard, Mouse, Touch, Ink
XAML UI Core
Vector, Animation, Text, Images
Media Digital media capture & playback (VC1, WMA, MP3)
Data
Language Integrated Query (LINQ), LINQ to XML, XML IsolatedStorage
SQL CE (Mango)
-
8/2/2019 WP7_tpa_1_silverlight
9/25
Silverlight for WP
Base Class Library (BCL) Generics, Collections, Cryptography, Threading
Windows Communication Foundation REST, RSS / ATOM, SOAP
-
8/2/2019 WP7_tpa_1_silverlight
10/25
XAML
-
8/2/2019 WP7_tpa_1_silverlight
11/25
-
8/2/2019 WP7_tpa_1_silverlight
12/25
Visual Studio for WP
Template options in Visual Studio for WP
-
8/2/2019 WP7_tpa_1_silverlight
13/25
Visual Studio for WP
Silverlight application
-
8/2/2019 WP7_tpa_1_silverlight
14/25
Visual Studio for WP
Target platform
-
8/2/2019 WP7_tpa_1_silverlight
15/25
Visual Studio for WP
Interface designer view and the XAML code view
-
8/2/2019 WP7_tpa_1_silverlight
16/25
Visual Studio for WP
Code behind C# view
-
8/2/2019 WP7_tpa_1_silverlight
17/25
Getting started: Pre-Hello WP7
No coding required
Launch Visual Studio 2010
New Project: Windows PhoneApplication
Choose target: Windows Phone 7
Emulator Choose run
Can explicitly build prior to this ifyou want to
Wait for the emulator to launch
Wait for your application to be
deployed Wait for your application to start
Admire the result!
-
8/2/2019 WP7_tpa_1_silverlight
18/25
Project template
Solution explorer
ApplicationIcon.png
Replace this image with the one you want to represent your
application on the phone. This is what the users will see when theysee your application on their phone.
App.xml
Think of this much like an ASP.NET web.config file. It is where you
keep universal data and settings for your entire application. Can be
used for keeping style data.
App.xml.csThe code-behind for the previous file, this is where you will handle
tombstoning your application.
-
8/2/2019 WP7_tpa_1_silverlight
19/25
Project template
AppManifest.xml
A simple application manifest file that is required to generate the application package (XAP).
AssemblyInfo.cs
Another configuration file that contains the name and version metadata that is embedded
into the generated assembly file.
Background.png
This should be the image you use when your application is pinned to the Start screen. It
would be smart to incorporate similar artwork to what you used in ApplicationIcon.png.
MainPage.xml
Your first application page. In nearly EVERY case, it should NOT be your only page. The phone
handles forward and backward navigation very well, and you should not bury all of yourapplications functionality into ONE xaml file.
-
8/2/2019 WP7_tpa_1_silverlight
20/25
Project template
MainPage.cs.xml
The code-behind for the MainPage.xaml file. When you need to make things happen in code,
this is where youll generally write it. Interacting with the objects on the XAML file is almost.
SplashScreenImage.jpg
This is the default image that is displayed if your application takes time to load. You can
replace this with the image of your choice, but remember that this is really only meant to letthe user know that theyre waiting for the actual application to load.
WMAppManifest.xml
Another metadata field that contains application specific data, like title, icon locations,
capabilities, etc.
Project file properties (NeutralResourcesLanguage)
TargetDevice
Emulator
-
8/2/2019 WP7_tpa_1_silverlight
21/25
On device development
On device development does not really differ much fromemulator development apart from set-up
Connection with the device requires Zune software Required USB drivers come with Zune
After the first connection developers can also use WPConnect insteadof Zune
The device used for development must be unlocked (orregistered)
Registered App hub developers can unlock phones, as well assubmit applications to the Market place Maximum number of devices that can be registered is 3 for student
developers 1
Following this the choice between emulator and device isdone in VS
-
8/2/2019 WP7_tpa_1_silverlight
22/25
On device debugging
Register the device with the registration tool Installed with the SDK
Requires network connection
Can also unregister devices
Launch Zune, and connect the device
Choose the Windows Phone Device as the target in the Visual Studio MAKE SURE THE DEVICE DOES NOT HAVE THE LOCK SCREEN ON!!!
Following this everything works as with the emulator, or even better Start with or without debugging invokes build, deploy and launches the app
takes about the same time as emulator After deployment the application is installed to the device
Can execute even when not connected to PC
Limit of maximum 10 development apps at a time
-
8/2/2019 WP7_tpa_1_silverlight
23/25
XAP files
The applications are deployed as XAP
XAP is in essence a zip file (hence the pronunciation zap) which contains
The manifest file
The DLL (compiled output assembly of the Silverlight project)
The app icon and other resources the app may use pdb file in debug builds (type and symbolic debugging information)
Once the application is ready to be submitted to the Market place the
XAP file is the basis for the submission files
During development the XAP file can be found at:
\bin\debug\
-
8/2/2019 WP7_tpa_1_silverlight
24/25
HelloWorld for WP
Create base for your project
Pick name
Remove capabilities, which wont be use
Remove refernces, which wont be use Put values into assembly info
Creat icon & splash scree (Paint.NET)
NeutralResourcesLanguage attribute !
Play with controls if you want, but make
backup first.
-
8/2/2019 WP7_tpa_1_silverlight
25/25
Q & A
??