mike taulty techdays 2010 silverlight and windows phone 7 ctp
DESCRIPTION
TRANSCRIPT
![Page 1: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/1.jpg)
![Page 2: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/2.jpg)
Mike Taulty Microsoft UK [email protected] mtaulty.com @mtaulty
Silverlight development for Windows Phone 7 CTP
![Page 3: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/3.jpg)
Silverlight is...?
2007
2008
2009 2010
1: a media player
2: .NET subset for RIA
3: out of browser
4: line of business
![Page 4: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/4.jpg)
Silverlight is...?
a development platform for Windows Phone 7 2007
2008
2009 2010
1: a media player
2: .NET subset for RIA
3: out of browser
4: line of business
![Page 5: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/5.jpg)
Silverlight development on the desktop
C#
Visual Basic
XAML
XAP
XAP
Manifest Assembly Resource
Silverlight Fx/CLR
![Page 6: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/6.jpg)
Silverlight development on Windows Phone 7
C#
Visual Basic
XAML
XAP
Manifest Assembly Resource
.NET Compact Framework/CLR
Windows Phone
Marketplace
![Page 7: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/7.jpg)
demo “Hello World” on the phone
![Page 8: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/8.jpg)
Silverlight functionality on Windows Phone 7
a super-subsetTM of Silverlight 3
![Page 9: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/9.jpg)
Silverlight 3 functionality on the desktop
UI Capabilities
Controls Media Graphics
Composition, Layout, Styling, Resources, Animation, Data Binding, Transformations, Effects
Network
• HTTP(S)
• WCF HTTP(S)
• WCF Data Services
• Sockets
Browser
• HTML Interop
• Javascript Interop
• SL SL Local Messaging
File System
• File Access
• Isolated Storage
![Page 10: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/10.jpg)
Core Assemblies
Silverlight 3 functionality on the desktop
SDK Assemblies
LINQ to XML
Data Annotations
JSON
Controls
• DataGrid
• DescriptionViewer
• Label
• ValidationSummary
• Calendar
• DatePicker
• GridSplitter
• TabControl
• TreeView
• AutoCompleteBox
• PagedCollectionView
WCF
• Data Services
• PollingDuplex
• Syndication
Visual Basic
XML
Browser Interop
WCF ServiceModel
Serialization
Networking
Core UI
•Controls
•Media
•Shapes
•etc
Core Framework
•Collections
• IO
•Diagnostics
•Reflection
•Threading
•etc. XML Serialization
![Page 11: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/11.jpg)
Core Assemblies
Silverlight 3 functionality in the Phone CTP
SDK Assemblies
Controls
• DataGrid
• DescriptionViewer
• Label
• ValidationSummary
• Calendar
• DatePicker
• GridSplitter
• TabControl
• TreeView
• AutoCompleteBox
• PagedCollectionView
WCF
• Data Services
• PollingDuplex
• Syndication
XML
WCF ServiceModel
Serialization
Networking
Core UI
•Controls
•Media
•Shapes
•etc
Core Framework
•Collections
• IO
•Diagnostics
•Reflection
•Threading
•etc.
Browser Interop
Visual Basic
Data Annotations
JSON
LINQ to XML
XML Serialization
![Page 12: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/12.jpg)
Silverlight 3 functionality in the Phone CTP
UI Capabilities Network
• HTTP(S)
• WCF HTTP(S)
File System
• Isolated Storage
Graphics Media Controls
Composition, Layout, Styling, Resources, Animation, Data Binding, Transformations, Effects
Phone Specific
Functionality
![Page 13: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/13.jpg)
about the phone...
![Page 14: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/14.jpg)
application structure – navigation applications
RootVisual
UserControl
Content
Frame
Page
desktop Silverlight
RootVisual
PhoneApplicationFrame
PhoneApplicationPage
phone Silverlight
![Page 15: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/15.jpg)
application lifecycle Not
Running
Startup
Running
Exit
Obscured
Paused
Shell Notification Switch Apps
app may be terminated
![Page 16: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/16.jpg)
controls and themes
standard Silverlight controls re-themed
support for dynamic theming based on user settings
wide margin for ease of touch
![Page 17: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/17.jpg)
demo navigation & control theming
![Page 18: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/18.jpg)
physical information about the phone
screen resolution?
where is the phone?
is the phone moving?
can I alert the user?
screen orientation?
![Page 19: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/19.jpg)
where is the phone?
GeoCoordinateWatcher watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Low); // saves power watcher.MovementThreshold = 20; // minimum of 20m - avoids noise, saves power watcher.StatusChanged += (sender, args) => { if (args.Status == GeoPositionStatus.Ready) { // ready... } }; watcher.PositionChanged += (sender, args) => { double altitude = args.Position.Location.Altitude; double latitude = args.Position.Location.Latitude; double longitude = args.Position.Location.Longitude; }; watcher.Start(); // this can throw and we should call Stop()
System.Device.Location.dll
![Page 20: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/20.jpg)
where is that again?
CivicAddressResolver resolver = new CivicAddressResolver(); GeoCoordinate location = GetAlreadyDeterminedLocation(); resolver.ResolveAddressCompleted += (sender, args) => { if (args.Error == null) { string line1 = args.Address.AddressLine1; string line2 = args.Address.AddressLine2; string city = args.Address.City; // etc... } }; resolver.ResolveAddressAsync(location); System.Device.Location.dll
![Page 21: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/21.jpg)
is the phone moving? can I alert the user?
AccelerometerSensor.Default.ReadingChanged += (sender, args) => { if (args.Value.State == SensorState.Ready) { // Deltas X,Y,Z from -1 to +1 – should also check timestamp here if (args.Value.Value.Y >= -0.5) { // Help! I'm falling! Not sure this will help but... VibrateController.Default.Start(new TimeSpan(0, 0, 2)); } } }; // this could throw & we should stop it at some point AccelerometerSensor.Default.Start();
Microsoft.Devices.dll
Microsoft.Devices.Sensors.dll
![Page 22: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/22.jpg)
demo physical aspects of the phone
![Page 23: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/23.jpg)
input capabilities of the phone
hardware buttons ApplicationBar
soft input panel
multi-touch
![Page 24: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/24.jpg)
demo input capabilities
![Page 25: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/25.jpg)
reaching out to existing phone functionality
Launchers “fire and forget” an OS app
Choosers OS offers selection UI for app
WebBrowser control for HTML integration
Choosers
• EmailAddressChooserTask
• PhoneNumberChooserTask
• PhotoChooserTask
Launchers
• BingMapsTask
• CameraCaptureTask
• EmailComposeTask
• MarketplaceLauncher
• MediaPlayerLauncher
• PhoneCallTask
• SaveEmailAddressTask
• SavePhoneNumberTask
• SearchTask
• SMSComposeTask
• WebBrowserTask
![Page 26: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/26.jpg)
demo launchers, choosers, web browser
![Page 27: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/27.jpg)
reaching out to the cloud for notifications
MyApp
Cloud Service
request unique URI
URI
Service (or Client) with push data
URI
transmission of this URI is “out of band”
HTTP POST
![Page 28: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/28.jpg)
reaching out to the cloud for notifications
MyApp
Cloud Service
Service (or Client) with push data
HTTP POST notification types • raw – only to a foreground app • toast – foreground app or as a
toast if app is not foreground • tile – always to the tile & also to
the app if in the foreground
![Page 29: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/29.jpg)
demo push notifications
![Page 30: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/30.jpg)
reaching out to XNA functionality
XNA libraries offer additional functionality e.g. audio capture from phone’s microphone
covered in Paul’s talk next...
![Page 31: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/31.jpg)
resources
developer.windowsphone.com Charles Petzold Preview Book
learningwindowsphone.com Sample Chapters from O’Reilly Book
channel9.msdn.com Windows Phone 7 Training Kit
odata library for Windows Phone 7 CTP silverlight.net
![Page 32: Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP](https://reader034.vdocuments.net/reader034/viewer/2022051816/54662da7af79596e458b4d7e/html5/thumbnails/32.jpg)
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.