Silverlight 101 Ahead! If you know Silverlight and are looking for more advanced content check out : ‘Microsoft Silverlight “Media” : Moving at.

Download Report

Transcript Silverlight 101 Ahead! If you know Silverlight and are looking for more advanced content check out : ‘Microsoft Silverlight “Media” : Moving at.

Silverlight 101 Ahead!
If you know Silverlight and are looking for
more advanced content check out :
‘Microsoft Silverlight “Media” : Moving at 60fps’
(Breakers H)
Microsoft Silverlight 4 Business Applications
(Lagoon F)
An Introduction to Developing
Applications for Microsoft Silverlight
Shawn Oster
Program Manager
Silverlight
[email protected]
Walk Away Knowing
How to create a Silverlight application
How to leverage your creativity
How to use the tools to make it happen
What is Silverlight?
Powerful Development Platform
Engaging, Interactive User Experiences
Silverlight Capabilities
Inputs
•
•
•
•
Keyboard
Mouse
Touch
Ink
XAML
UI Core
•
•
•
•
Vector
Animation
Text
Images
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
Application Platform High Level Architecture
Tools & Support
Phone Emulator
Sample
s
Guides
SCREEN
CLOUD
Documentatio
n
Community
Run Time – On “Screen”
Sensors
Phone
Media
Data
Location
Gamer Services Notifications
.NET Framework managed code sandbox
Packaging and Verification Tools
Developer Portal Services
Cloud Services
Registration
Marketplace
Notifications
Validation
MO and CC Billing
Location
Certification
Business Intelligence
Publishing
Update Management
App Deployment
Identity
Feeds
Social
Maps
What is Silverlight for WP7?
Starts with Silverlight 3 plus…
Performance tuning
Input integration
H/W media and sensor integration
OS application model integration
Relaxed sandbox constraints
Show Me Some Code!
THE FUN STUFF
XAML
eXtensible
Application
Markup
XML
Declarative Markup
<Grid>
<TextBlock FontSize="48" Text="Hello world" />
</Grid>
Language
Code
XAML maps to code
Anything in XAML can be done in code
The Basics
DEMO - XAML + CODE
Shapes
Vector-Based
Importable from Photoshop or Illustrator
Brushes
Determines how objects are painted and outlined
Solid, Gradient, Image, Media
Pretty Shapes
DEMO – SHAPES + BRUSHES
Controls
Encapsulates functionality
Give it a x:Name
Same properties as in XAML
<Button x:Name="MyButton"
Content="Center"
Width="150"
Height="50" />
Events
Can be created in XAML & Code
Tools create handler for you
public void myButton_Click(object sender, RoutedEventArgs e)
{
// todo: add code
}
Make it Do Something
DEMO – CONTROLS + EVENTS
Styling
Apply consistent formatting
Per-page or per-application
<Style TargetType="TextBlock"
x:Key="SubHeadingText">
<Setter Property="FontSize"
Value="42" />
<Setter Property="Foreground"
Value="Blue" />
</Style>
Make it Consistent
DEMO – STYLING
Layout
Flexible Layout system
Canvas | Fixed-position
StackPanel | “Stacks” dynamically
Grid | Rows & columns, very flexible
Where Does It Go?
DEMO – LAYOUT
Transforms
Alters any element
Transforms
Projections
Controls
Text
Media
Rotate
Scale
Skew
Translate
Matrix
Plane
Matrix
Apply 3D to a 2D
element
Animations
Animate a property value over time
Basics
Storyboard
Animation
Keyframe
Expression Blend is the best tool for designing animations
Make it Look Great
DEMO –TRANSFORMS,
ANIMATIONS
Databinding
Powerful Concept
Two types
Property binding
List binding
Based on change notification
Make it Real
DEMO – DATABINDING
Code Reuse
Reuse UI
User Control
Custom Control
Reuse Code
Across platforms
Across projects
(Web, Windows
Phone)
Don’t Reinvent The Wheel
DEMO – CODE REUSE
Call to action
 Download the tools!
 http://silverlight.net
 http://developer.windowsphone.com




Start building great apps and games
Be creative
Go see other presentations
Resources:
 Forums, Blogs, Books, Podcasts, Oh My!
 My blog http://shawnoster.com
29
Where Next?
Building Windows Phone Applications with Silverlight, part 1 & 2
Make your application rock on Windows Phone 7!
Shake, rattle & roll with accelerometer & vibration
Cloud & Push notifications
Location services
Maximizing Silverlight Performance on
Windows Phone 7 Series
Make your applications
rock!
Please fill out the evaluation form!
It’s Question Time!