• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Windows Phone 7 and Silverlight
 

Windows Phone 7 and Silverlight

on

  • 2,105 views

 

Statistics

Views

Total Views
2,105
Views on SlideShare
2,070
Embed Views
35

Actions

Likes
2
Downloads
32
Comments
0

1 Embed 35

http://blogs.msdn.com 35

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Windows Phone 7 and Silverlight Windows Phone 7 and Silverlight Presentation Transcript

    • Glen Gordon
      Developer Evangelist, Microsoft
      http://blogs.msdn.com/glengordon
      @glengordon
      Building Windows Phone 7 Apps with Silverlight
    • Agenda
      Silverlight Momentum
      Development Experience
      Phone Controls
      Web Browser Control
      App Bar
      Navigation
      Launchers and Choosers
      Application Lifecycle
    • Agenda
      Silverlight Momentum
      XAML Fundamentals
      Development Experience
      Phone Controls
      Q&A
      ….with lots of demos!
    • Silverlight Momentum
    • Silverlight 1
      September 2007
    • Silverlight 2
      October 2008
      Silverlight 1
      September 2007
    • Silverlight 3
      July 2009
      Silverlight 1
      Silverlight 2
      September 2007
      October 2008
    • Silverlight 4
      Business Applications
      Media
      Beyond the Browser
      Silverlight 1
      Silverlight 2
      Silverlight 3
      Silverlight 4
      September 2007
      October 2008
      July 2009
      April 2010
    • 60%
      RIAStats.com
    • 225%
      Simplyhired.com
    • Development Experience
    • Windows Phone 7 Framework
      Windows Phone Frameworks
      Camera
      Device Integration
      Launchers & Choosers
      Windows Phone Controls
      PhoneApplicationPage
      PushNotification
      WebBrowserControl
      Sensors
      PhoneApplicationFrame
      Silverlight Presentation and Media
      XNA Frameworks for Games
      Controls
      Drawing
      IsolatedStorage
      Drawing
      GamerServices
      Navigation
      Shapes
      Markup
      Media
      Audio
      Media
      Graphics
      Content
      Input
      Application Object
      Common Base Class Library
      Diagnostics
      Reflection
      IO
      Runtime
      Resources
      Globalization
      Text
      Location
      Net
      Collections
      ComponentModel
      Configuration
      Security
      Threading
      ServiceModel
      Linq
    • Graphics Composition
      Start Experience
      System Tray
      Direct3D Surface
      AppPage
      Notification
      Volume
      SIP
      Incoming Call
      App Bar
      Shell frame composes all UI into a single screen
      Central page management enables cross app UI transitions and other effects
      You can also do this for orientation changes
    • UI Model: Familiar Web Concepts
      Phone application
      Provides UI represented as XAML pages connected into cross-app flows by URI’s
      Web application
      Provide media represented as HTTP resources linked by URL’s
      Shell frame
      Requests pages, renders UI, and handles navigation across apps
      Web browser
      Requests HTTP resources, renders them, and handles navigation across sites
      Sessions and back stack
      Groups together sequences of pages corresponding to a user’s activity across apps
      History and tabs
      Groups together sequences of HTTP resources corresponding to a user’s activity across sites
    • Phone Controls
    • Silverlight Controls
      Rich Set of Controls
      Familiar
      Additional features
      For example, Software Input Panel (SIP) support on TextBox
      16
    • Supported
      Border
      Button
      Canvas
      CheckBox
      Grid
      HyperlinkButton
      Image
      ListBox
      MediaElement
      Messagebox
      ProgressBar
      RadioButton
      ScrollViewer
      TextBlock
      TextBox
      WebBrowser
    • Controls support Touch
      Mouse Events
      Automatically converted for you
      SIP and WebBrowser control have gestures
      ScrollViewer
      Just like Silverlight
      Basic Flick and Pan gestures
      Raw
      Touch.FrameRendered
      DoodlePad – Sketch App
    • Controls support Touch
      Gestures
      System level (WM_GESTURE). Can make your own.
      Tap, Double Tap, Pan, Flick, Touch and Hold
      Multi-Touch
      Pinch, Stretch
      Manipulations
      Events
      ManipulationStarted
      ManipulationData
      ManipulationCompleted
      Use for Drag and Drop, etc.
    • DEMO – Controls
    • List Application
      Master/Detail Data
      MainPage.Xaml, DetailsPage.xaml
      ViewModel
      ItemViewModel.cs, MainViewModel.cs
      Project Types
      VS2010 calls it List Application and Blend calls it Databound Application
    • DEMO – List Application
    • WebBrowser control
      Displays network and local content
      Gestures: pan, double tap and pinch
      Supports transforms & projections
      No Input on transform
      Application can interact with JavaScript
      Optimized for privacy
      Script is disabled by default
      Cookies and cache are isolated
      23
    • Silverlight to Script
      Silverlight
      string fromScript = wb.InvokeScript("runScriptStuff", arg1, arg2);
      JavaScript
      function runScriptStuff(arg1, arg2)
      { return “awesome”; }
    • Script to Silverlight
      Silverlight
      void wb_ScriptNotify(object s, NotifyEventArgs e)
      {
      string fromScript = e.Value;
      }
      JavaScript
      Window.external.Notify(string);
    • DEMO – Web Browser
    • AppBar
      Toolbar
      Up to 4 icons
      Can set transparency level
      Slide up Menu can display more items
      Can declare in code or XAML
      Icons found under Program FilesMicrosoft SDKsWindows Phonev7.0Icons
    • AppBar
      Icons
      48 pixels by 48 pixels
      White foreground on a transparent background
      Using alpha channel.
      Icon get colorized to current style
      Circle will be added
    • DEMO – AppBar
    • Frame and Page
      Frame
      Top-level container control
      PhoneApplicationFrame class
      Contains the page control and system elements such as system tray and application bar
      Page
      Fills the entire content region of the frame
      PhoneApplicationPage-derived class
      Optionally surfaces its own application bar
      Handles Orientation
      NavigatedTo and NavigatedFrom
    • Page Navigation
      Forward
      NavigationService.Navigate(new Uri(“/Page2.xaml”,uriKind.RelativeOrAbsolute));
      Back
      NavigationService.GoBack();
      Hardware Back Button
      Handle BackKeyPress, OnBackKeyPressand Navigate to where you would like
    • DEMO – Navigation
    • Tasks - Launchers and Choosers
      Launcher
      Launches one of the built-in applications through which a user completes a task
      No data is returned to calling application
      Example: PhoneCallTask
      Chooser
      Launches one of the built-in applications through which a user completes a task, and which returns some data to calling application
      When caller completes, calling application is activated and supplied with the Chooser result
      Example: PhotoChooserTask
    • Launchers & Choosers
      Launchers
      EmailComposeTask
      MarketplaceDetailTask
      MarketplaceHubTask
      MarketplaceReviewTask
      MarketplaceSearchTask
      MediaPlayerLauncher
      PhoneCallTask
      SearchTask
      SMSComposeTask
      WebBrowserTask
      Choosers
      CameraCaptureTask
      EmailAddressChooserTask
      PhoneNumberChooserTask
      PhotoChooserTask
      SaveEmailAddressTask
      SavePhoneNumberTask
    • DEMO – Tasks
    • UI and State Management: Concepts
      Page UI
      Describes the visual appearance of a page
      Retained in shell frame to support resuming paused sessions
      Discarded while the session is paused
      Page State
      Contains data that describes an instance of a page, analogous to browser cookie
    • App Lifecycle
      Close
      Back Button
      Tombstoned
      Start Button
      Task Launched
      Phone call received
      Handle events in App.xaml.cs
    • App State - Storage
      Isolated Storage
      Settings and Custom Data
      Secure and Sandboxed
      Logical Folder Structure via APIs
      No quota currently
      Be responsible and inform/empower user
      State Management
      PhoneApplicationPage/PhoneApplicationState
      Good for transient data
    • Isolated Storage API
      Using System.IO;using System.IO.IsolatedStorage;IsolatedStoragefileisf = IsolatedStorageFile.GetUserStoreForApplication();
      IsolatedStorageFileStreamfs = new IsolatedStorageFileStream(“myfile.txt”,FileMode.Open,isf);
      StreamReadersr = new StreamReader(fs);
      data=sr.ReadLine();
      sr.Close();
    • DEMO – Lifecycle
    • Web Services
    • Calling a Service
      WebClient Class
      Just like Silverlight
      WebClient client = new WebClient(); client.DownloadStringCompleted += DownloadComplete; client.DownloadStringAsync(new Uri(RssUrl));
      oData Library
      oData.org
      Covered this afternoon
    • DEMO 9 – Netflix Web Service
    • Q&A and Break
    • © 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.