An Introduction to Developing Applications for Microsoft Silverlight Jaime Rodriguez
What is Silverlight? Powerful Development Platform Engaging, Interactive User Experiences
Silverlight Capabilities Inputs Keyboard Mouse Touch Ink Media Digital media capture & playback VC1, WMA, MP3 Data Language Integrated Query (LINQ) LINQ to XML XML IsolatedStorage Base Class Library (BCL) Generics Collections Cryptography Threading Windows Communication Foundation REST RSS/ATOM SOAP XAML UI Core Vector Animation Text Images
CLOUD SCREEN Phone Emulator Sample s Documentatio n GuidesCommunity Packaging and Verification Tools Notifications LocationIdentityFeeds MapsSocial App Deployment Registration Validation Certification Publishing Marketplace MO and CC Billing Business Intelligence Update Management Application Platform High Level Architecture Tools & Support Developer Portal ServicesCloud Services SensorsMediaData Gamer ServicesNotifications.NET Framework managed code sandbox Location Phone Run Time – On “Screen”
Performance tuning Input integration H/W media and sensor integration OS application model integration Relaxed sandbox constraints What is Silverlight for WP7? Starts with Silverlight 3 plus…
THE FUN STUFF Show Me Some Code!
XAML XML Declarative Markup
XAML maps to code Anything in XAML can be done in code Code
DEMO - XAML + CODE The Basics
Vector-Based Importable from Photoshop or Illustrator Shapes
Determines how objects are painted and outlined Solid, Gradient, Image, Media Brushes
DEMO – SHAPES + BRUSHES Pretty Shapes
<Button x:Name="MyButton" Content="Center" Width="150" Height="50" /> Encapsulates functionality Give it a x:Name Same properties as in XAML Controls
Can be created in XAML & Code Tools create handler for you public void myButton_Click(object sender, RoutedEventArgs e) { // todo: add code } Events
DEMO – CONTROLS + EVENTS Make it Do Something
Layout Grid | Rows & columns, very flexible Flexible Layout system Canvas | Fixed-position StackPanel | “Stacks” dynamically
DEMO – LAYOUT Where Does It Go?
Transforms Controls Text Media Rotate Scale Skew Translate CompositeTransform Matrix Plane Matrix Apply 3D to a 2D element Alters any elementTransformsProjections
Animations Animate a property value over time Basics Expression Blend is the best tool for designing animations StoryboardAnimationKeyframe
DEMO –TRANSFORMS, ANIMATIONS Make it Look Great
Apply consistent formatting Per-page or per-application <Style TargetType="TextBlock" x:Key="SubHeadingText"> <Setter Property="FontSize" Value="42" /> <Setter Property="Foreground" Value="Blue" /> Styling
DEMO – STYLING Make it Consistent
Databinding Powerful Concept Two types Based on change notification Property bindingList binding
DEMO – DATABINDING Make it Real
Code Reuse Reuse UI User ControlCustom Control Reuse Code Across projects Across platforms (Web, Windows Phone)
Thanks!! Questions?