2. Speaker.Bio.ToString
Dennis J. Perlot
Many years experience
Computer Science/Engineering degree
Artificial Intelligence/Machine Learning
Smithsonian Innovators Award
Instructor for Franklins.Net
Technology Community Advocate
Speaker/ Technology Evangelist
3. Announcing
3rd Monday of each month
NERD Center Microsoft Offices
Cambridge, MA Farmington, CT
First Meeting Oct 18th 6:00pm in Cambridge
4. Housekeeping
PLEASE
Set phone to silent/vibrate
Hold questions to insure we can get through the material
70+ Slides 10 Demos
I will be here all day if we run out of time
5. Why are you here?
Free Training
Free Coffee
Free Food
You care about user interface
15. User Interface is Important
To end users interface is the system
User frustration leads to abandonment
Good User Interface is now expected
Applications rejected if lacking
“User Centered Design” groups
Many moving to User Experience (UX)
16. Different levels
User Interface Designer
Interactions, colors, fonts, etc.
Information Architect
Logical organization of application
User Experience Designer
Total experience including install, call center, etc.
18. Design Toolbox
http://www.microsoft.com/design/toolbox/
Tutorials to help developers with design
Sample Titles:
Introduction to Design Composition
Balance: White Space and Visual Weight
Understanding Hue, Saturation and Value
The Psychology of Color
Understanding the Concept of Themes and Gestalt
20. History
WPF/E – E for Everywhere
Prior working name
Silverlight
Version 1.0 – March 2007
Layout, video, 2D, java script
Version 2.0 – Sept 2008
Standard controls, sockets, .NET languages
Version 3.0 – July 2009
60 Controls, 1080p, out of browser
Version 4.0 – April 2010
Printing, elevated trust
21. New Stuff
What is new with Silverlight 4?
Many Incremental Improvements
Rich Text Box
Web Cam and Microphone
Text Trimming
Right Mouse Button and Wheel Support
Visual Studio 2010
Houston, we have a design surface!
22. More OOB
Additional Out of Browser features
Toast Notifications
COM Inter Op
Elevated trust
Local file system access
24. Where will it run?
Silverlight requires browser plug-in
Plug-in available for
Internet Explorer
Fire Fox
Safari
Chrome
Opera
Sea Monkey
Mono – under dev
25. What do I need ?
Visual Studio 2010
Silverlight 4 runtime plug-in
Silverlight 4 toolkit
WCF RIA toolkit
Expression Blend 4
Or Use Web Platform Installer
28. XAML
eXtensible Application Markup Language
Must be Well Formed
Used for WPF and Silverlight
Think of it as HTML on steroids
Ctrl k+d is your friend
29. Traditional Controls
Text Box <TextBox …. />
Button <Button .... />
Check Box <CheckBox .…/>
Radio Button <RadioButton …. />
Combo Box <ComboBox …. />
And many, many more
30. Margins
Margin=Left, Top, Right, Bottom
Many Flavors
Margin = “5,5,5,5”
Margin = “5,5” Left / Right, Top/ Bottom
Margin = “5” All get same value
31. Layout Controls
Canvas
Left, Right, Bottom, Top positioning of elements
Grid
Tabular row/column layout – like HTML tables
Stack Panel
Arranges child elements vertically or horizontally
35. You Got To Have Style
Styles leverage setter properties
Tied to control type
Quickly change “Look and Feel”
Add as many as needed
Named Styles
Controls definition references explicitly
Implicit Styles
Think of as default styles
43. Mouse Support
Right Mouse button support
Context menu
Easy with Silverlight 4 toolkit
Mouse Wheel support
Must handle events or get passed along
Mouse down and Mouse up
45. Animations
Easier to do than prior to WPF
Storyboards
Animations
Begin Time, Duration, Auto Reverse
Vary value of a property double, single, color, point
Trigger Event
Easing Functions
47. Draw Loop But which Timer?
System.Windows.Forms.Timer
WinForms development, runs on WinForm UI thread
System.Timers.Timer
By default runs on a worker thread but supports a
SynchronizationObject which can be set to a UI object
meaning the timer runs on the UI thread
System.Threading.Timer
Recommended for Silverlight
49. Data Binding
Bindings
Tie control properties to data sources or other properties
Declarative through XAML (or programmatic)
Data Context
Data flows from parent to child controls
Data Templates
Key for data binding
Set of elements to be applied repeatedly
Like ASP.NET repeater control
56. Web Services
Lots of options
Lots of confusion
WCF/RIA Recommended for Silverlight
Rich tooling support in VS 2010
Project Template support
57. WCF RIA
ADO.NET Entity Framework
Data Model
Generate from Database
Domain Service Class
WCF services that encapsulate the business logic
Exposes a set of operations
Business Application Template
Built in authentication
60. Common Questions
All XAML in Silverlight?
Not yet, just a subset
How can I quickly change the look and feel?
Use Styles
61. Common Questions
What about deployment?
Nothing special needed on web server
Use Publish to web server
Hosting page detects if Silverlight installed
62. Common Questions
What about performance?
Define goals
Measure early and often
Minimize the byte count
Watch depth of logical tree
Will take advantage of hardware like GPU, Pixel Shader,
Vertex Shader, etc.
Watch the XAP size
Enable application library caching
63. Common Questions
What abut design patterns?
Unity
MEF – Multiple Extensible Framework
MV-VM – Model View – View Model
MV-VM light
Prism
66. Jesse Liberty advice
1. Go to http://www.silverlight.net/getstarted and download the
components you need
2. Work your way through #1-5 in the “Start Learning Silverlight”
section on that same page
3. Take a look http://jesseliberty.com/Tags/gettingstarted
4. Take a look at the Silverlight How-Do-I videos, picking subjects
that seem interesting to you.
5. Join the http://forums.silverlight.net/forums/14.aspx
They are the very best place to get fast answers.
67. UI Reading List
About Face 1, About Face 2, About Face 3,
The Inmates are Running the Asylum
by Alan Cooper
Don’t Make Me Think
by Steve Krug
Why Software Sucks
by David Platt
Understanding Comics – The Invisible Art
by Scott McCloud
68. Demos (if we have time)
BI Dashboard Prototype
Combat Explorer
70. 10 Things Silverlight Dev Must Know
9. How to Hand-Code XAML
8. How to Use Expression Blend
7. How to Write Value Converters
6. Threading
5. Async Programming
4. An Architectural Pattern (like MVVM or similar)
3. The Layout System
2. Dependency Properties
1. Binding
0. Our limitations, and when to call in a designer.
Editor's Notes
Now tabs are a good thing but too much of a good thing………………
This keeps showing up when you google, I mean bing, bad UI examples
Must be well formed
Create pageDrag text blockRemove height, Set horz align center, remove margin, Change text, set vert to center, Add font size
CC3_Styles
Create new project – SL appAdd context menu from toolbox , choose items, Silver ContextMenu be sure it is toolkitAdd 3 textbox 2 slider and 3 color rectangles red, green, blueWire textbox to slider valuesAsk crowd what they like to do for menu itemsPast event handlers
Can also do DrawLoop type animations
Create ProjectType Grid row defType stackpanel text block, text box, sliderCut and paste, change names
Asmx, wcf,odata, rest, soap, plain wcf, wcf with RIA,
Create biz appIn web project add new item ado.net entity Generate from database, connect stringRebuild solutionWhy Need EDM for next stepsIn Web project add new item Domain Service class (show search)RebuildIn Silverlight project add new item silverlight pageOrders, Employees,Drag table from data sourceRemove height and width values from gridsAutoGen Columns to TRUEAdd nav to Mainpage.xamlRun appShow column movement