• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Windows Phone 7 apps development with Silverlight

on

  • 1,823 views

 

Statistics

Views

Total Views
1,823
Views on SlideShare
1,823
Embed Views
0

Actions

Likes
1
Downloads
25
Comments
0

0 Embeds 0

No embeds

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
  • My presentation – universitate, msp, interests in MS products,Questions to know each other- Programming level, Silverlight, Design
  • 0Examplesfor SL 3 apply to the Phone12 the text box has a associated sw keyboard, list have implemented phisyx3 same video experience, sensors : vibr, location services4 app is part from experience – same look as Phone5 security concerns – relax cross-domain policy check
  • Render Thread FPS: The number of frames per second that the independent simple animations and rendering thread is using. Keeping around 60 will provide a great experience, while a number of 30 fps will begin to show a poor experience to the end user.Under 30 fps this counter will turn red in post-beta builds.User Interface Thread FPS: The number of fps that the primary user interface thread is experiencing. Property change notifications, data binding, primary managed code execution, and animations not handled on the render thread use this threads’ resources.Turns red when the count is at or below 15 fps.Texture Memory Usage: A specialized memory counter indicating the video memory used for storing application textures.Surface Counter: A count of the number of surfaces that are passed to the graphics chip.Intermediate Texture Count: The number of intermediate textures created for compositing.Screen Fill Rate: A metric representing the number of complete phone screens being painted each and every frame.
  • Start the dev of sample application – text block in XAML and code
  • Importable from designers‘ PhotoshopNo demo yet
  • Demo with Ellipse
  • VS can create the events for youOr you can create them by handDefault event handler for Button – Click eventOr by double clicking
  • Grid – layout system, not semantic informational display
  • Attached propertiesA ball doesn‘t now its position, but the parent can provide it.Canvas – not so flexible, phone can be rotatedStack panel Grid – rows : auto or * or pixels
  • Ball pulsing demo app - animation in Blend - call it from code

Windows Phone 7 apps development with Silverlight Windows Phone 7 apps development with Silverlight Presentation Transcript

  • Silverlight programming on Microsoft Phone
    Radu Poenaru
    Microsoft Student Partner
  • What we are trying to achieve
    How to create a simple Silverlight app
    Use Blend 4 for Phone for design
    http://70gigapixel.cloudapp.net/
  • What is Silverlight?
    “Silverlight is a powerful development platform for creating engaging, interactive user experiences for Web, desktop, and mobile applications when online or offline.”
    Microsoft Official Silverlight website
    http://www.silverlight.net/
  • Silverlight
    Very powerful framework
    Same known XAML and C#
    Windows, Mac, Linux and now Phone
    Learning curve is smooth
  • Silverlight capacities
    Data
    Inputs
    • Language Integrated Query (LINQ)
    • LINQ to XML
    • XML
    • IsolatedStorage
    • Keyboard
    • Mouse
    • Touch
    • Ink
    Base Class Library (BCL)
    XAML
    • Generics
    • Collections
    • Cryptography
    • Threading
    UI Core
    • Vector
    • Animation
    • Text
    • Images
    Windows Communication Foundation
    Media
    • REST
    • RSS/ATOM
    • SOAP
    • Digital media capture & playback
    • VC1, WMA, MP3
  • What about Silverlight for Phone
    It is a superset of Silverlight 3 having several elements from Silverlight 4 and many extras:
    Performance tuning
    Input integration
    Hardware media and sensor integration
    OS application model integration
    Relaxed sandbox constraints
  • application structure
    first, a little history…
  • Application
    default silverlight application
    UserControl
    Content
    Content
    Content
  • Application
    Application
    silverlight 3 navigation application
    UserControl
    UserControl
    Frame
    Page 3
    Page 1
    Page 2
    Content
    Content
    Content
  • ?
    Windows Phone application
    Application
    Application
    UserControl
    Frame
    Frame
    Page 3
    Page 1
    Page 2
    Page 3
    Page 1
    Page 2
  • back key details
    Lets the user to return to previously-viewed screens
    Can go back across applications
    Not used for application-specific behaviour
  • a world of constant interruptions
    phone calls
    low battery
    lock screen
    reminders
    App
    switch
    txt msgs :-)
  • basic application lifetime
    • Splash screen
    • App constructor
    • Startup event
    • Exit event
    • Obscured
    • Paused
  • obscured: popup ui from shell
    Not in the Mix build
    • Phone call
    • Reminder
    • Battery low
    Games could auto-pause
    Game could auto-resume
    What if they answer the phone?
  • paused: jump to another app
    Not in the Mix build
    • Start Button
    • Accept call
    • Open toast
    Load state to continue where you left off
    User never knows what happened :-)
    Assume your process is killed
    Save state for later use
  • Evaluating app performance
    • Render Thread FPS: The number of frames per second that the independent simple animations and rendering thread is using.
    • User Interface Thread FPS: The number of fps that the primary user interface thread is experiencing
    • Texture Memory Usage: A specialized memory counter indicating the video memory used for storing application textures.
    • Surface Counter: A count of the number of surfaces that are passed to the graphics chip.
    • Intermediate Texture Count: The number of intermediate textures created for compositing.
    • Screen Fill Rate: A metric representing the number of complete phone screens being painted each and every frame.
  • Basics
    XAML – eXtensible Application Markup Language
    XML with custom tags
    Maps to code
    Can contain as children
    resources
    styles
    controls
    supports binding
    Anything that is done in XAML can be done in code
  • Shapes
    Vector- based
    Easy to scale, keeping the smoothness
    Can be easily imported from Photoshop or Illustrator
    Example(ellipse code):
  • Brushes
    Determines how objects are painted and outlined
    Solid – filled with just one color
    Gradient – linear or radial with multiple stop points
    Image – shows an image in the brush
    Media – paints with a playing movie
    Let‘s see a Demo!
  • Controls
    Encapsulate functionality
    Requires a x:Name if you plan to call it from the code
    Same properties in XAML as in Code
  • Events
    Can be created in XAML and Code
    XAML editor helps you create a handler
  • Layout containers
    Flexible Layout system
    Canvas – fixed position
    StackPanel – „Stacks“ dynamically
    Grid – rows and columns, very flexible
    Can be nested – but beware of performance issues
  • Demo
    Layout demo
    Attached properties
  • Transforms
    Alters any element
    Controls
    Text
    Media
    Transforms
    Rotate, Scale, Skew ,Translate, Matrix
    Projections
    Plane, Matrix,
    Apply 3D to a 2D element
  • Animations
    Animates a property value over the time
    Basic elements in a page
    Contains one or more Storiboards
    Contains one or more Animations
    Contains one or more Keyframes
    Expression Blend is the best tool to do this
    Let‘s see some demo!
  • Styling
    Applies a set of values to a specific target type
    Created in page Resources, application Resources or a ResourceDictionary
    Requires
    x:Key
    TargetType
    On the element – StaticResource pointing to the x:Key
  • Binding
    Connects data to UI
    Two types
    Property binding
    List binding
    Value converters – ex take color Red and convert it to hex representation
    Based on change notification
    Cascades through the hierarchy of controls
  • Code reuse
    Reuse UI
    User controls
    Custom controls
    Reuse code
    Across projects
    Across platforms – Web, Desktop through OOB, Phone
  • References
    Search for Silverlight 3 source:
    Forums, books, podcasts
    http://silverlight.net
    http://www.stackoverflow.com
    Get Started with Silverlight for Windows Phone http://www.silverlight.net/getstarted/devices/windows-phone/
    Silverlight for Windows Phone forum http://forums.silverlight.net/forums/63.aspx
    Mix 2010 event http://live.visitmix.com/Sessions
  • Do you have questions ?
    Comments and sugestions are welcome!
    radu.poenaru@studentpartners.de
    www.radupoenaru.com
    Thank you!