SlideShare a Scribd company logo
1 of 70
Building Applications
         with
 Silverlight 4 -Part 1
    Dennis J. Perlot
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
Announcing




3rd Monday of each month

NERD Center                      Microsoft Offices
Cambridge, MA                    Farmington, CT

First Meeting Oct 18th 6:00pm in Cambridge
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
Why are you here?


Free Training

Free Coffee

Free Food

You care about user interface
Examples of Bad UI


Disclaimer

Apologies
Tab Tab Tab Tab
Busy Busy Busy
Reduce Complexity
Density
Just Ignore It
Even More Bad UI
Attempt at Useful Error Message
The most useless error message
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)
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.
Read These Books!


Don’t Make Me Think
  By Steve Krug




Why Software Sucks
  By David Platt
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
Silverlight


Background
What new in version 4
Controls and Templates
Data binding
WCF/RIA

And lots of demos
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
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!
More OOB


Additional Out of Browser features
 Toast Notifications
 COM Inter Op
 Elevated trust
 Local file system access
Silverlight Architecture
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
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
Web Platform Installer
Web Platform Installer
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
Traditional Controls


Text Box                <TextBox …. />
Button                  <Button .... />
Check Box               <CheckBox .…/>
Radio Button            <RadioButton …. />
Combo Box               <ComboBox …. />


  And many, many more
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
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
It Starts with a Silverlight App
Demo


Hello World
And we get…
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
Named Styles


<Style x:Key="DefaultLabelStyle" TargetType="Label">
   <Setter Property="FontSize" Value="10"/>
   <Setter Property="Background" Value="LightGray"/>
   <Setter Property="VerticalAlignment" Value="Top"/>
</Style>
<Style x:Key=“GreenLabelStyle" TargetType="Label">
   <Setter Property="FontSize" Value="12"/>
    <Setter Property="Foreground" Value="DarkGreen"/>
   <Setter Property="Background" Value="LightGreen"/>
   <Setter Property=“HorizontalAlignment" Value=“Center"/>
</Style>
<Label x:Name=“LabelName” Style="{StaticResource DefaultLabelStyle}" >
<Label x:Name=“LabelName” Style="{StaticResource GreenLabelStyle}" >
Implicit Styles


<Application.Resources>
   <Style TargetType="Button">
     <Setter Property="Background" Value="Red"/>
     <Setter Property="FontSize" Value="16"/>
     <Setter Property="Height" Value="55"/>
   </Style>
 </Application.Resources>



<Button Content="Button" Width="100"/>
Demo


Implicit and Named Styles
And we get
Text Trimming


Property of TextBlock

Determines visible limit

Truncates text exceeding width

Places Ellipsis to indicate more…
Demo


Text Trimming
And we get
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
Demo


Mouse Right Click and Wheel
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
Animation


<Storyboard x:Name="myStoryboard">
  <DoubleAnimation
        Storyboard.TargetName="MyAnimatedRectangle"
        Storyboard.TargetProperty="Opacity"
        From="1.0" To="0.0"
        Duration="0:0:1"
        AutoReverse="True"
        RepeatBehavior="Forever" />
</Storyboard>
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
Demo


EKG like Animation
Or
Planet Orbits
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
Binding Types

Binding Target                         Binding Source


Dependency Object                           Object


                         OneWay
Dependency Property
                         TwoWay            Property

                      OneWayToSource
Data Binding


<Label Content="{Binding path=PropertyName}"

  <Label Content="{Binding Path=BizFunction}“


ControlName.DataContext = Object;

  ListBox1.DataContext = List <T>;
Demo


Slider to text box demo
Data Templates


Template is really it’s own design surface

<DataTemplate x:Key="BizTemplate">
  <StackPanel>
    <Label Content="Business Score: "/>
    <Label FontWeight="Bold"
   Content="{Binding Path=BusinessScore}"/>
  </StackPanel>
</DataTemplate>
Data Templates


Bold fields are bound data
Data Templates


<DataTemplate x:Key="AttackerTemplate">
<Border BorderBrush="Red" BorderThickness="1" Width="300">
<StackPanel Orientation="Horizontal" >
         <TextBlock Text="Name: " />
         <TextBlock FontWeight="Bold"
                  Text="{Binding Path=Name}"/>
         <TextBlock Text=" BS : "/>
         <TextBlock FontWeight="Bold"
         Text="{Binding Path=BallisticSkill}"/>
 </StackPanel>
Web Services


Lots of options
Lots of confusion
WCF/RIA Recommended for Silverlight
Rich tooling support in VS 2010
 Project Template support
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
Demo


WCF/RIA with Northwind database
Demo


Every developer’s favorite:
       The Data Grid
             and now
       The Data Form
Common Questions


All XAML in Silverlight?
  Not yet, just a subset


How can I quickly change the look and feel?
  Use Styles
Common Questions


What about deployment?
  Nothing special needed on web server
  Use Publish to web server
  Hosting page detects if Silverlight installed
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
Common Questions


What abut design patterns?
  Unity
  MEF – Multiple Extensible Framework
  MV-VM – Model View – View Model
  MV-VM light
  Prism
Resources


http://www.silverlight.net
channel9.msdn.com/shows/silverlighttv
http://live.visitmix.com
http://www.Silverlightshow.net

Window Presentation Foundation Unleashed – Adam Nathan

Silverlight 3 Programmers Reference - Wrox
BLOGS


Scott Guthrie (ScottGu)
Silverlight
  John Papa
  Jesse Liberty
  Tim Heuer
Expression Blend
  Adam Kinney
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.
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
Demos (if we have time)



BI Dashboard Prototype

Combat Explorer
Questions



and hopefully some answers
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.

More Related Content

What's hot

Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtmlsagaroceanic11
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeMediacurrent
 
What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1Fons Sonnemans
 
Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!Jim McKeeth
 
Developing and Deploying Windows 10 Apps
Developing and Deploying Windows 10 AppsDeveloping and Deploying Windows 10 Apps
Developing and Deploying Windows 10 AppsFons Sonnemans
 
XPages OneUIv2 Theme Deep Dive
XPages OneUIv2 Theme Deep DiveXPages OneUIv2 Theme Deep Dive
XPages OneUIv2 Theme Deep DiveWorkFlowStudios
 
Alt tab - better apex tabs
Alt tab - better apex tabsAlt tab - better apex tabs
Alt tab - better apex tabsEnkitec
 
Accessibility and universal usability
Accessibility and universal usabilityAccessibility and universal usability
Accessibility and universal usabilitySarah Hudson
 
The Audio User Experience for Widgets
The Audio User Experience for WidgetsThe Audio User Experience for Widgets
The Audio User Experience for Widgetstoddkloots
 
#42 green lantern framework
#42   green lantern framework#42   green lantern framework
#42 green lantern frameworkSrilu Balla
 
Green Lantern Framework with Selenium IDE
Green Lantern Framework with Selenium IDEGreen Lantern Framework with Selenium IDE
Green Lantern Framework with Selenium IDESrilu Balla
 
Introduction To Wpf Engines
Introduction To Wpf   EnginesIntroduction To Wpf   Engines
Introduction To Wpf EnginesTamir Khason
 
Intro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniterIntro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniterbrightrocket
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5Steven Chipman
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5IT Geeks
 

What's hot (17)

Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtml
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
 
What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1
 
Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!
 
Developing and Deploying Windows 10 Apps
Developing and Deploying Windows 10 AppsDeveloping and Deploying Windows 10 Apps
Developing and Deploying Windows 10 Apps
 
XPages OneUIv2 Theme Deep Dive
XPages OneUIv2 Theme Deep DiveXPages OneUIv2 Theme Deep Dive
XPages OneUIv2 Theme Deep Dive
 
Alt tab - better apex tabs
Alt tab - better apex tabsAlt tab - better apex tabs
Alt tab - better apex tabs
 
Accessibility and universal usability
Accessibility and universal usabilityAccessibility and universal usability
Accessibility and universal usability
 
Hello windows 10
Hello windows 10Hello windows 10
Hello windows 10
 
The Audio User Experience for Widgets
The Audio User Experience for WidgetsThe Audio User Experience for Widgets
The Audio User Experience for Widgets
 
#42 green lantern framework
#42   green lantern framework#42   green lantern framework
#42 green lantern framework
 
Green Lantern Framework with Selenium IDE
Green Lantern Framework with Selenium IDEGreen Lantern Framework with Selenium IDE
Green Lantern Framework with Selenium IDE
 
Introduction To Wpf Engines
Introduction To Wpf   EnginesIntroduction To Wpf   Engines
Introduction To Wpf Engines
 
Intro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniterIntro to ExpressionEngine and CodeIgniter
Intro to ExpressionEngine and CodeIgniter
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Php
PhpPhp
Php
 

Viewers also liked

Viewers also liked (8)

Who Am I
Who Am IWho Am I
Who Am I
 
2008 2086 Gangler
2008 2086 Gangler2008 2086 Gangler
2008 2086 Gangler
 
Who Am I
Who Am IWho Am I
Who Am I
 
Torre2010
Torre2010Torre2010
Torre2010
 
Miriam
MiriamMiriam
Miriam
 
Miriam
MiriamMiriam
Miriam
 
Mgangler Virtualization
Mgangler VirtualizationMgangler Virtualization
Mgangler Virtualization
 
Mario5
Mario5Mario5
Mario5
 

Similar to Building appsinsilverlight4 part_1

MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedDave Bost
 
Raj Wpf Controls
Raj Wpf ControlsRaj Wpf Controls
Raj Wpf Controlsrramabad
 
Mix 2010 twilight
Mix 2010 twilightMix 2010 twilight
Mix 2010 twilightIntergen
 
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsDave Allen
 
WPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysWPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysDave Bost
 
Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4Boston Area SharePoint Users Group
 
WPF & Silverlight UI
WPF & Silverlight UIWPF & Silverlight UI
WPF & Silverlight UIDave Allen
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightFrank La Vigne
 
Silverlight Developer Introduction
Silverlight   Developer IntroductionSilverlight   Developer Introduction
Silverlight Developer IntroductionTomy Ismail
 
Intro to-html-backbone
Intro to-html-backboneIntro to-html-backbone
Intro to-html-backbonezonathen
 
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...Raj Lal
 
Windows Presentation Foundation
Windows Presentation FoundationWindows Presentation Foundation
Windows Presentation FoundationTran Ngoc Son
 
Silverlight 2
Silverlight 2Silverlight 2
Silverlight 2Dave Bost
 
Integrazione PHP e Silverlight 4
Integrazione PHP e Silverlight 4Integrazione PHP e Silverlight 4
Integrazione PHP e Silverlight 4pietrobr
 
ASPNET for PHP Developers
ASPNET for PHP DevelopersASPNET for PHP Developers
ASPNET for PHP DevelopersWes Yanaga
 
Building the next generation of browser apps today
Building the next generation of browser apps todayBuilding the next generation of browser apps today
Building the next generation of browser apps todayRandy Williams
 

Similar to Building appsinsilverlight4 part_1 (20)

MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
 
Raj Wpf Controls
Raj Wpf ControlsRaj Wpf Controls
Raj Wpf Controls
 
Mix 2010 twilight
Mix 2010 twilightMix 2010 twilight
Mix 2010 twilight
 
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight Applications
 
WPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysWPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these days
 
Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4
 
WPF & Silverlight UI
WPF & Silverlight UIWPF & Silverlight UI
WPF & Silverlight UI
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
 
Silverlight Training
Silverlight TrainingSilverlight Training
Silverlight Training
 
Silverlight Developer Introduction
Silverlight   Developer IntroductionSilverlight   Developer Introduction
Silverlight Developer Introduction
 
HTML5
HTML5 HTML5
HTML5
 
Intro to-html-backbone
Intro to-html-backboneIntro to-html-backbone
Intro to-html-backbone
 
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...
 
Windows Presentation Foundation
Windows Presentation FoundationWindows Presentation Foundation
Windows Presentation Foundation
 
Silverlight 2
Silverlight 2Silverlight 2
Silverlight 2
 
Integrazione PHP e Silverlight 4
Integrazione PHP e Silverlight 4Integrazione PHP e Silverlight 4
Integrazione PHP e Silverlight 4
 
ASPNET for PHP Developers
ASPNET for PHP DevelopersASPNET for PHP Developers
ASPNET for PHP Developers
 
Intro to Application Express
Intro to Application ExpressIntro to Application Express
Intro to Application Express
 
WPF and Databases
WPF and DatabasesWPF and Databases
WPF and Databases
 
Building the next generation of browser apps today
Building the next generation of browser apps todayBuilding the next generation of browser apps today
Building the next generation of browser apps today
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

Building appsinsilverlight4 part_1

  • 1. Building Applications with Silverlight 4 -Part 1 Dennis J. Perlot
  • 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
  • 6. Examples of Bad UI Disclaimer Apologies
  • 13. Attempt at Useful Error Message
  • 14. The most useless error message
  • 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.
  • 17. Read These Books! Don’t Make Me Think By Steve Krug Why Software Sucks By David Platt
  • 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
  • 19. Silverlight Background What new in version 4 Controls and Templates Data binding WCF/RIA And lots of demos
  • 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
  • 32. It Starts with a Silverlight App
  • 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
  • 36. Named Styles <Style x:Key="DefaultLabelStyle" TargetType="Label"> <Setter Property="FontSize" Value="10"/> <Setter Property="Background" Value="LightGray"/> <Setter Property="VerticalAlignment" Value="Top"/> </Style> <Style x:Key=“GreenLabelStyle" TargetType="Label"> <Setter Property="FontSize" Value="12"/> <Setter Property="Foreground" Value="DarkGreen"/> <Setter Property="Background" Value="LightGreen"/> <Setter Property=“HorizontalAlignment" Value=“Center"/> </Style> <Label x:Name=“LabelName” Style="{StaticResource DefaultLabelStyle}" > <Label x:Name=“LabelName” Style="{StaticResource GreenLabelStyle}" >
  • 37. Implicit Styles <Application.Resources> <Style TargetType="Button"> <Setter Property="Background" Value="Red"/> <Setter Property="FontSize" Value="16"/> <Setter Property="Height" Value="55"/> </Style> </Application.Resources> <Button Content="Button" Width="100"/>
  • 40. Text Trimming Property of TextBlock Determines visible limit Truncates text exceeding width Places Ellipsis to indicate more…
  • 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
  • 46. Animation <Storyboard x:Name="myStoryboard"> <DoubleAnimation Storyboard.TargetName="MyAnimatedRectangle" Storyboard.TargetProperty="Opacity" From="1.0" To="0.0" Duration="0:0:1" AutoReverse="True" RepeatBehavior="Forever" /> </Storyboard>
  • 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
  • 50. Binding Types Binding Target Binding Source Dependency Object Object OneWay Dependency Property TwoWay Property OneWayToSource
  • 51. Data Binding <Label Content="{Binding path=PropertyName}" <Label Content="{Binding Path=BizFunction}“ ControlName.DataContext = Object; ListBox1.DataContext = List <T>;
  • 53. Data Templates Template is really it’s own design surface <DataTemplate x:Key="BizTemplate"> <StackPanel> <Label Content="Business Score: "/> <Label FontWeight="Bold" Content="{Binding Path=BusinessScore}"/> </StackPanel> </DataTemplate>
  • 54. Data Templates Bold fields are bound data
  • 55. Data Templates <DataTemplate x:Key="AttackerTemplate"> <Border BorderBrush="Red" BorderThickness="1" Width="300"> <StackPanel Orientation="Horizontal" > <TextBlock Text="Name: " /> <TextBlock FontWeight="Bold" Text="{Binding Path=Name}"/> <TextBlock Text=" BS : "/> <TextBlock FontWeight="Bold" Text="{Binding Path=BallisticSkill}"/> </StackPanel>
  • 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
  • 59. Demo Every developer’s favorite: The Data Grid and now The Data Form
  • 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
  • 65. BLOGS Scott Guthrie (ScottGu) Silverlight John Papa Jesse Liberty Tim Heuer Expression Blend Adam Kinney
  • 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

  1. Now tabs are a good thing but too much of a good thing………………
  2. This keeps showing up when you google, I mean bing, bad UI examples
  3. Must be well formed
  4. Create pageDrag text blockRemove height, Set horz align center, remove margin, Change text, set vert to center, Add font size
  5. CC3_Styles
  6. 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
  7. Can also do DrawLoop type animations
  8. Create ProjectType Grid row defType stackpanel text block, text box, sliderCut and paste, change names
  9. Asmx, wcf,odata, rest, soap, plain wcf, wcf with RIA,
  10. 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
  11. Show person class with basic
  12. Show person class