330 likes | 559 Views
Building Windows Phone Applications with Silverlight (Part 1). Mike Harsh Program Manager, Microsoft. Silverlight for Windows Phone. Silverlight and the XNA framework are the basis of the Windows Phone application platform In-browser Silverlight is not part of the first Windows Phone release
E N D
Building Windows Phone Applications with Silverlight (Part 1) Mike Harsh Program Manager, Microsoft
Silverlight for Windows Phone • Silverlight and the XNA framework are the basis of the Windows Phone application platform • In-browser Silverlight is not part of the first Windows Phone release • These sessions will be a lap around the platform
Parts 1 & 2 Mike • Introduction • Output • Input • Web Browser • OS App Integration Peter • App model • Navigation • Templates and Styles • Services
Silverlight for Windows Phone Goal Seamless code and knowledge sharing across Silverlight projects
Parts 1 & 2 Mike • Introduction • Output • Input • Web Browser • OS App Integration Peter • App model • Navigation • Templates and Styles • Services
Media • Media support • H/W decode • MediaStreamSource • PlayReady DRM • XNA framework sound effect API • Supports polyphonic, looping wav data • MediaElement Limitations • One MediaElement only • No VideoBrush
Vibration • Vibrates the phone for a given duration • Useful for haptic feedback • Notifying users of updates VibrateControllervc = VibrateController.Default; vc.Start(TimeSpan.FromSeconds(3));
Parts 1 & 2 Mike • Introduction • Output • Input • Web Browser • OS App Integration Peter • App model • Navigation • Templates and Styles • Services
Input • Silverlight TextBox integrates with the SIP • Supports and scrolling • Password has a delay • SIP supports input scoping • Key InputScopes: Text, Url, Number, Time, TelephoneNumber, EmailNameOrAddress • ScrollViewer has built-in support for pan and flick.
Accelerometer +Y Measures force applied on each axis over time -Z -X +X +Z -Y
Audio Input • Mic input • Gives access to raw PCM WAV data • Calls BufferReadyevent at regular intervals • Call the GetData method from the BufferReady event or as often as your app requires • 10ms latency
Parts 1 & 2 Mike • Introduction • Output • Input • Web Browser • OS App Integration Peter • App model • Navigation • Templates and Styles • Services
Web Browser Control • Displays network and local content • Supports pan, double tap and pinch to zoom • Supports transforms • Application can interact with javascript • Disabled by default
Silverlight to Script Silverlight string out = wb.InvokeScript("runScriptStuff", arg1, arg2); javascript function runScriptStuff(arg1, arg2) { return “awesome”; }
Script to Silverlight Silverlight void wb_ScriptNotify(object s, NotifyEventArgs e) { string return = e.Value; } javascript window.external.Notify(string);
Parts 1 & 2 Mike • Introduction • Output • Input • Web Browser • OS App Integration Peter • App model • Navigation • Templates and Styles • Services
Integrating with the OS • Hub integration • Enhance the built in hubs with your application • Launchers let you fire and forget to an OS app • SMS, email, web browser, maps, dialer, search, etc • Choosers are like an open file dialog • Launches an OS experience for letting the user choose data for the app • Picture, contact, camera, etc
Hub Integration – Media History • Apps can insert entries into the history list
Hub Integration - Photos • Your app can integrate with the OS image viewer • One click away from extras menu
Launchers & Choosers Choosers Launchers • BingMapsTask • MarketplaceLauncher • MediaPlayerLauncher • PhoneCallTask • PhoneNumberChooserTask • PhotoChooserTask • SaveEmailAddressTask • SavePhoneNumberTask • SearchTask • SMSComposeTask • WebBrowserTask • CameraCaptureTask • EmailAddressChooserTask • EmailComposeTask
Silverlight 3 API Delta • Application model • Out of Browser APIs • Browser & plug-in specific APIs • HTML Dom Bridge • Machine information • GpuInformation • Analytics • Custom shaders • Media markers and attributes
There will be Windows Phone focus groups on Wednesday, March 17th at 10am, 11:30am, and 2pm in the Mandalay Bay If you are interested in participating in these focus groups or future Windows Phone research, please email SusanTo@microsoft.com Usability Study
Further Information • <Insert docs reference> • http://blogs.msdn.com/mharsh
Feedback Guidelines • We know some things are not right… • Control templates are not complete • Key controls like pivot don’t exist • Missing animation support • Some things we really need feedback on… • Code re-use with desktop • Push integration • Application lifecycle • “Background” scenarios for a future release