Silverlight 5 for Line of Business




                            Jeremy Likness
                            Project Manager, Senior Consultant          Copyright © 2011


                            jlikness@wintellect.com



consulting   training   design   debugging                       wintellect.com
what we do
    consulting     training    design     debugging

 who we are
   Founded by top experts on Microsoft – Jeffrey Richter, Jeff Prosise, and John Robbins –
   we pull out all the stops to help our customers achieve their goals through advanced
   software-based consulting and training solutions.

 how we do it                                           Training
                                                        •   On-site instructor-led training
   Consulting & Debugging                               •   Virtual instructor-led training
   •   Architecture, analysis, and design services      •   Devscovery conferences
   •   Full lifecycle custom software development
   •   Content creation                                 Design
   •   Project management                               •   User Experience Design
   •   Debugging & performance tuning                   •   Visual & Content Design
                                                        •   Video & Animation Production


consulting    training    design     debugging                                   wintellect.com
Agenda
 •   A Brief History of Silverlight
 •   Where We Are (Some Case Studies)
 •   Miscellaneous Post-Beta Features
 •   Text
 •   Threading
 •   Data-Binding
 •   User Interface
 •   Custom Markup and Types
 •   Trusted Applications
 •   The Third Dimension

consulting   training   design   debugging   wintellect.com
A Brief History of Silverlight
 • Silverlight 1.0
 • 2007
 • JavaScript with benefits


  “If at first you don’t succeed
       … call it version 1.0”




consulting   training   design   debugging   wintellect.com
A Brief History of Silverlight
 •   Silverlight 2.0
 •   2008
 •   Common Language Runtime (CLR)
 •   Dynamic Language Runtime (DLR)
 •   Deep Zoom
      “The great thing about Object
     Oriented code is that it can make
     small, simple problems look like
          large, complex ones.“

consulting   training   design   debugging   wintellect.com
A Brief History of Silverlight
 • Silverlight 3.0
 • 2009
 • 2D-3D (“Perspective”)
 • GPU
 • Element Binding
 • Out of Browser
 “Three screens and a cloud … [a]
      fundamental shift in the
  computing paradigm.“ - Ballmer

consulting   training   design   debugging   wintellect.com
A Brief History of Silverlight
 •   Silverlight 4.0
 •   2010
 •   Web Cam and Microphone
 •   HTML inside Silverlight
 •   MEF
 •   WCF RIA
 •   COM
 •   Chrome support
      “If brute force doesn't solve your
  problems, then you aren't using enough.“

consulting   training   design   debugging   wintellect.com
A Brief History of Silverlight
 • Silverlight 5.0
 • 2011
 • Are you kidding me?! That’s what the
   rest of this talk is for!

     “Computers are incredibly fast,
   accurate, and stupid; humans are
     incredibly slow, inaccurate and
  brilliant; together they are powerful
     beyond imagination.” – Albert
                  Einstein


consulting   training   design   debugging   wintellect.com
Where We Are
 • 1 million Silverlight developers (Silverlight team blog)
 • 70% penetration (RIAStats.com)
 • Silverlight Firestarter: DayForce
    – “1/4th cost to build Silverlight compared to Java”
    – “1/30th total cost due to reduced load on servers”
 • Major enterprise adoption, including Fortune 500
   companies




consulting   training   design   debugging             wintellect.com
Microsoft eScience
 “Re-write the existing
 Windows Forms
 application in both
 Silverlight and
 WPF, and to
 correspondingly re-
 create the user
 interface design, using
 as much of a single
 code base as possible.”



consulting   training   design   debugging   wintellect.com
2010 Olympics Health Monitoring
 “Over 12 petabytes of
 data, and at peak loads
 streamed 374 gigabits of
 video per second and
 handled 2.4 million
 pages per second. With
 82 million mobile page
 views, 1.9 million mobile
 video streams, and 5,000
 hours of live and on-
 demand video...”




consulting   training   design   debugging   wintellect.com
PriceWaterhousecoopers SharePoint

 “Utilize Microsoft’s
 Silverlight
 technology to
 deliver interactive
 dashboards and
 onscreen
 reports, within an
 integrated
 SharePoint
 environment.”



consulting   training   design   debugging   wintellect.com
KNFB Blio eReader

 “The Blio project
 represented a
 challenging technical
 application for WPF
 and even more so for
 the Silverlight platform.
 An e-reader has a
 surprisingly large
 degree of complexity
 around user
 interaction, input, and
 rendering.”

consulting   training   design   debugging   wintellect.com
Microsoft Looking Glass
 “Re-work and enhance the
 UI design of the tool as
 well as re-migrate the code
 fully to Silverlight 4, and
 architect the backend code
 using the Model-View-
 View Model (MVVM)
 pattern to support unit
 testing, modularity, scalabil
 ity, and robustness within
 the application. ”




consulting   training   design   debugging   wintellect.com
Rooms to Go Silverlight Slate App

 “Putting our business applications on the slate device was
 very easy. We just identified the applications, the data
 used, whipped up the interface and web services and we were
 able to do it rather quickly.”




consulting   training   design   debugging         wintellect.com
Hooters
 “Eliminate Flash
 technology from
 their main web site
 in order to achieve
 an approximate
 order-of-magnitude
 increase in page
 load performance.”




consulting   training   design   debugging   wintellect.com
Where We are Going




consulting   training   design   debugging   wintellect.com
Miscellaneous Post-Beta Features
 •   WS-Trust
 •   64-bit
 •   Immediate-mode graphics
 •   Hardware acceleration in windowless mode (IE9)
 •   Direct access to USB devices
 •   Microsoft Office integration
 •   Full keyboard support in full screen
 •   P/Invoke


consulting   training   design   debugging    wintellect.com
Text
 • Text overflow areas (multi-column text)
      – RichTextBoxOverflow control
      – Link RichTextBox to one or more RichTextBoxOverflow
        controls and flow text from one to the other
 • Controllable character spacing (leading)
      – CharacterSpacing property on text-input elements
 • Crisper text display via pixel snapping (post-beta)
 • Enhanced OpenType support (post-beta)



consulting   training   design   debugging           wintellect.com
Text Overflow
                                       “Overflow additional text to this element…”


     <RichTextBox FontSize="20"
     OverflowContentTarget="{Binding ElementName=ColumnTwo}">
                 <Paragraph>Blah, blah, blah</Paragraph>
             </RichTextBox>
             <RichTextBoxOverflow x:Name="ColumnTwo"
     Grid.Column="1" OverflowContentTarget="{Binding
     ElementName=ColumnThree}"/>
             <RichTextBoxOverflow x:Name="ColumnThree"
     Grid.Column="2"/>


                                                       “I can receive overflow text…”




consulting   training   design   debugging                              wintellect.com
Character Spacing
  <Slider Minimum="1" Maximum="100" Value="2"
  x:Name="SpacingSlider" ToolTipService.ToolTip="{Binding
  ElementName=SpacingSlider, Path=Value}" Grid.Row="1"
  Grid.Column="2"/>

  <TextBlock Margin="10" Grid.Row="2" HorizontalAlignment="Stretch"
  Grid.ColumnSpan="3" Height="30" CharacterSpacing="{Binding
  ElementName=SpacingSlider,Path=Value}"
              Text="Keep your eye on the text block. Things may
  change here!" VerticalAlignment="Top"/>



                                             “Set the leading spacing to this…”




consulting   training   design   debugging                             wintellect.com
demo
   Text Overflow and Character Spacing




consulting   training   design   debugging   wintellect.com
Threading
 • Dedicated composition thread
      – GPU animations no longer handled on UI thread
      – Adapted from Silverlight for Windows Phone
 • Decreased network latency
      – HttpWebRequest calls removed from UI thread
      – Up to 90% less latency according to Microsoft




consulting   training   design   debugging              wintellect.com
Composition Thread                                  “Set this…”

                                                          “…and this…”

  <param name="enableGPUAcceleration" value="true"/>
  …
  <Rectangle CacheMode="BitmapCache" Width="100" Height="50"
  Fill="Red">
      <Rectangle.RenderTransform>
          <RotateTransform x:Name="SpinLeft" />
      </Rectangle.RenderTransform>
  </Rectangle>                 “…and this will run on composition the thread.”

  <Storyboard x:Name="LeftSpin">
      <DoubleAnimation
              Storyboard.TargetName="SpinLeft"
  Storyboard.TargetProperty="Angle" From="0" To="360"
  Duration="0:0:1" RepeatBehavior="Forever" />
  </Storyboard>



consulting   training   design   debugging                         wintellect.com
demo
   Animations on the Composition Thread




consulting   training   design   debugging   wintellect.com
Data-Binding
 •   Style data binding
 •   Implicit data templates
 •   Ancestor binding
 •   Data binding debugging




consulting   training   design   debugging   wintellect.com
Style Data Binding
  <Themes:MyThemes x:Key="Theme"/>


                        INotifyPropertyChanged class that exposes brushes, gradients
  <Style TargetType="Grid">
      <Setter Property="Background" Value="{Binding
  GradientBrush,Source={StaticResource Theme}}"/>
  </Style>




                                      Implicit style that binds to the theme class




consulting   training    design    debugging                               wintellect.com
Implicit Data Templates                           Implied based on the data type

  <Grid.Resources>
      <DataTemplate DataType="model:Photo">
          <Templates:PhotoTemplate/>
      </DataTemplate>
      <DataTemplate DataType="model:BlogPost">
          <Templates:BlogTemplate/>
      </DataTemplate>
      <DataTemplate DataType="model:Tweet">
          <Templates:TweetTemplate/>
      </DataTemplate>                  No ItemTemplate: implied one is used
  </Grid.Resources>
  <ListBox ItemsSource="{Binding SocialFeed}"
  Background="{StaticResource DarkBackground}"/>




consulting   training   design   debugging                      wintellect.com
Ancestor Binding
  <Button Content="Delete Post"
        Command="{Binding DataContext.DeleteCommand,
  RelativeSource={RelativeSource
  AncestorType=Grid,AncestorLevel=3}}"

                                 Bind to the third parent in the visual tree that is a Grid

         CommandParameter="{Binding}"/>



                                                Binds to the current data context




consulting   training   design      debugging                                 wintellect.com
Data-Binding Debugging
 • Set breakpoints on {Binding} expressions in XAML
 • Analyze broken bindings, detect when target is
   updated, and more
 • Use locals window to analyze binding




consulting   training   design   debugging   wintellect.com
demo
   Data Binding in Silverlight 5




consulting   training   design   debugging   wintellect.com
User Interface
 • Click counting
 • Text search
 • Vector-based printing




consulting   training   design   debugging   wintellect.com
Click Counting
  private void _ButtonMouseLeftButtonDown(object sender,
  MouseButtonEventArgs e)
  {                                        New click count parameter
      var text = "Single-click.";            on MouseEventArgs
      if (e.ClickCount > 1)
          text = "Double-click.";
      if (e.ClickCount > 2)
          text = "Triple-click.";
      if (e.ClickCount > 3)
          text = string.Format("Clicked {0} times", e.ClickCount);
      ClickCount.Text = text;
  }




consulting   training   design   debugging                 wintellect.com
Text Search
  public class ImageItem
  {
      public string Path { get; set; }
      public string Name { get; set; }
  }

  <ListBox ItemsSource="{Binding Images}"
         TextSearch.TextPath="Name">



                                             When keyboard pressed, will match
                                              first characters of this property




consulting   training   design   debugging                          wintellect.com
Printing
 •   Vector-based
 •   PostScript
 •   Virtual print view
 •   No new API, uses older method
 •   Reduce size/footprint of print buffer
 •   Elements sent as vectors for better fidelity when
     scaled or printed at higher resolutions



consulting   training   design   debugging       wintellect.com
demo
   Click Count and Text Search




consulting   training   design   debugging   wintellect.com
Custom Markup and Types
 • Custom markup extensions
      – Markup extensions appear in XAML in {}
      – Provide more flexibility for extending what XAML does
      – Are able to reference the targets to which they are
        applied
 • Custom types
      – ICustomTypeProvider
      – “Go the way of reflection…”
      – The dynamic types that bind



consulting   training   design   debugging           wintellect.com
Custom Markup                                Inherit MarkupExtension (the Extension word
                                                         goes away in XAML)


  public class ViewModelGlueExtension : MarkupExtension
                                   Implement this method and return what you need.

  public override object ProvideValue(IServiceProvider
  serviceProvider)
  {                     Optionally reach out and grab the target object/property
     var ipvt =
  serviceProvider.GetService(typeof(IProvideValueTarget))
     as IProvideValueTarget;
     var targetObject = ipvt.TargetObject;
  }
                                    Then reference and use as needed.

  DataContext="{jounce:ViewModelGlue
  ViewModelName=CustomViewModel}"



consulting   training   design   debugging                              wintellect.com
Custom Type Provider
                                                      Inherit ICustomTypeProvider

  public class CustomType : ICustomTypeProvider
                                 Only one method – but this is where the work is!
  public Type GetCustomType()
  {
      return _helper.GetCustomType();
  }
                                                 Now get your dynamic on!
  CustomType.AddProperty(“Age”, typeof(int));
  var type = new CustomType();
  type.SetPropertyValue(“Age”, 36);

                                                    Totally bindable, dude!



consulting   training   design   debugging                            wintellect.com
demo
   Custom Markup Extension and Custom Type Provider




consulting   training   design   debugging            wintellect.com
Trusted Applications
 • Can now run inside the browser
      – Requires permissions (localhost excepted)
      – Can host WebBrowser controls in-browser, too
 • Can now create multiple windows
      – Modeless dialogs, tear-off windows, and more
      – Only available to trusted out-of-browser apps
 • Can now access entire file system




consulting   training   design   debugging              wintellect.com
Child Window
  new Window                  FrameworkElement
  {
      Content = child,
      Width = 450,
                              Layer on top of other active windows
      Height = 400,
      Title = title,
      TopMost = true,
      Visibility = Visibility.Visible
  };
                                                   Defaults to Collapsed




consulting   training   design   debugging                       wintellect.com
demo
   Child Windows




consulting   training   design   debugging   wintellect.com
The Third Dimension
 • Silverlight 5 includes robust 3D support
      –   Hardware (GPU) accelerated
      –   Immediate-mode XNA-based API
      –   Built-in shaders/effects coming post-beta
      –   Supports textures, bump mapping, etc.
 • DrawingSurface control represents 3D canvas
      – Draw event signals opportunity to redraw
 • Requires Shader Model 2.0-compatible hardware
 • Requires consent or trust on Windows XP

consulting   training   design   debugging            wintellect.com
3D Models
 • Models are formed from meshes of 3D triangles
      – Define vertices using X-Y-Z coordinates
      – Connect vertices to form triangles
      – Connect triangles to form meshes
 • Triangles can be shaded with colors or textures




consulting   training   design   debugging        wintellect.com
demo
   The Third Dimension




consulting   training   design   debugging   wintellect.com
Resources

 • Silverlight 5
   http://www.microsoft.com/silverlight/future
 • Jounce MVVM/MEF Framework
   http://jounce.codeplex.com/
 • My Blog & Twitter
   http://csharperimage.jeremylikness.com/
   @JeremyLikness


consulting   training   design   debugging   wintellect.com
Questions?




                            Jeremy Likness
                            Project Manager, Senior Consultant
                            jlikness@wintellect.com



consulting   training   design   debugging                       wintellect.com

More Related Content

PDF
The Days of Web Standards "IA" 20070715
PDF
HTML CSS JavaScript jQuery Training
PPTX
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
PDF
Virtual Desktops: Why is this So Hot
PDF
Adaptive Web Design Workshop [inspire 2011]
PDF
Adaptive Web Design Workshop [Iceweb 2011]
PDF
jQuery: The World's Most Popular JavaScript Library Comes to XPages
PDF
Adaptive Web Design Workshop [WebVisions NYC 2012]
The Days of Web Standards "IA" 20070715
HTML CSS JavaScript jQuery Training
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
Virtual Desktops: Why is this So Hot
Adaptive Web Design Workshop [inspire 2011]
Adaptive Web Design Workshop [Iceweb 2011]
jQuery: The World's Most Popular JavaScript Library Comes to XPages
Adaptive Web Design Workshop [WebVisions NYC 2012]

What's hot (20)

PPTX
Html5 on Mobile(For Developer)
PPTX
Bringing HTML5 alive in SharePoint
PDF
Angular or Backbone: Go Mobile!
PPTX
Toronto HTML5 User Group Meet Up #2 – Application Development with HTML 5
PDF
The History and Status of Web Crypto API (2012)
PPTX
Pearls and Must-Have Tools for the Modern Web / .NET Developer
DOC
Sai Sharan_UI_Resume
PDF
Responsive Enhancement
PPTX
A Day Building Fast, Responsive, Extensible Single Page Applications
DOC
SYED_PHPMYSQL_CV
PDF
Developer Pitfalls & Strategies for Improving Mobile Web Developer Experience
PPTX
SEF 2014 - Responsive Design in SharePoint 2013
PDF
Responsive and Fast
PDF
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
PPTX
Optimizing Browser Rendering
PPTX
High Performance Mobile Web
PDF
HK CodeConf 2015 - Your WebPerf Sucks
PDF
HTML5: the new frontier of the web
PDF
Win j svsphonegap-damyan-petev-mihail-mateev
PPT
Randori design goals and justification
Html5 on Mobile(For Developer)
Bringing HTML5 alive in SharePoint
Angular or Backbone: Go Mobile!
Toronto HTML5 User Group Meet Up #2 – Application Development with HTML 5
The History and Status of Web Crypto API (2012)
Pearls and Must-Have Tools for the Modern Web / .NET Developer
Sai Sharan_UI_Resume
Responsive Enhancement
A Day Building Fast, Responsive, Extensible Single Page Applications
SYED_PHPMYSQL_CV
Developer Pitfalls & Strategies for Improving Mobile Web Developer Experience
SEF 2014 - Responsive Design in SharePoint 2013
Responsive and Fast
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
Optimizing Browser Rendering
High Performance Mobile Web
HK CodeConf 2015 - Your WebPerf Sucks
HTML5: the new frontier of the web
Win j svsphonegap-damyan-petev-mihail-mateev
Randori design goals and justification
Ad

Similar to Silverlight 5 (20)

PPTX
Intro to modern web technology
PPTX
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
PPTX
Html5 more than just html5 v final
PPTX
Windows 8: A Tale of Two Stacks
PPTX
Mastering-Full-Stack-Web-Development-An-NIELIT-Perspective.pptx
PPTX
(Updated) SharePoint & jQuery Guide
PPTX
Wintellect - Windows 8 for the Silverlight and WPF Developer
PPTX
Curtin University Frontend Web Development
PDF
Using Web Standards to create Interactive Data Visualizations for the Web
PDF
Talk Paris Infovis 091207132953 Phpapp01(2)
PPTX
Visual State Manager
PPTX
Training presentation.pptx
PPTX
025444215.pptx
PDF
Web Development for UX Designers
PPTX
Internship softwaretraining@ijse
PPTX
web development
PPTX
Introduction to HTML .pptx
PPT
Html5 Whats around the bend
PPTX
WEB DEVELOPMENT.pptx
PPTX
HTML5 - A Whirlwind tour
Intro to modern web technology
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Html5 more than just html5 v final
Windows 8: A Tale of Two Stacks
Mastering-Full-Stack-Web-Development-An-NIELIT-Perspective.pptx
(Updated) SharePoint & jQuery Guide
Wintellect - Windows 8 for the Silverlight and WPF Developer
Curtin University Frontend Web Development
Using Web Standards to create Interactive Data Visualizations for the Web
Talk Paris Infovis 091207132953 Phpapp01(2)
Visual State Manager
Training presentation.pptx
025444215.pptx
Web Development for UX Designers
Internship softwaretraining@ijse
web development
Introduction to HTML .pptx
Html5 Whats around the bend
WEB DEVELOPMENT.pptx
HTML5 - A Whirlwind tour
Ad

Recently uploaded (20)

PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PPTX
Configure Apache Mutual Authentication
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PPTX
Internet of Everything -Basic concepts details
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
Training Program for knowledge in solar cell and solar industry
PPTX
Build Your First AI Agent with UiPath.pptx
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
Statistics on Ai - sourced from AIPRM.pdf
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
Convolutional neural network based encoder-decoder for efficient real-time ob...
Configure Apache Mutual Authentication
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Improvisation in detection of pomegranate leaf disease using transfer learni...
Internet of Everything -Basic concepts details
sustainability-14-14877-v2.pddhzftheheeeee
Training Program for knowledge in solar cell and solar industry
Build Your First AI Agent with UiPath.pptx
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
sbt 2.0: go big (Scala Days 2025 edition)
Statistics on Ai - sourced from AIPRM.pdf
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
NewMind AI Weekly Chronicles – August ’25 Week IV
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」

Silverlight 5

  • 1. Silverlight 5 for Line of Business Jeremy Likness Project Manager, Senior Consultant Copyright © 2011 [email protected] consulting training design debugging wintellect.com
  • 2. what we do consulting training design debugging who we are Founded by top experts on Microsoft – Jeffrey Richter, Jeff Prosise, and John Robbins – we pull out all the stops to help our customers achieve their goals through advanced software-based consulting and training solutions. how we do it Training • On-site instructor-led training Consulting & Debugging • Virtual instructor-led training • Architecture, analysis, and design services • Devscovery conferences • Full lifecycle custom software development • Content creation Design • Project management • User Experience Design • Debugging & performance tuning • Visual & Content Design • Video & Animation Production consulting training design debugging wintellect.com
  • 3. Agenda • A Brief History of Silverlight • Where We Are (Some Case Studies) • Miscellaneous Post-Beta Features • Text • Threading • Data-Binding • User Interface • Custom Markup and Types • Trusted Applications • The Third Dimension consulting training design debugging wintellect.com
  • 4. A Brief History of Silverlight • Silverlight 1.0 • 2007 • JavaScript with benefits “If at first you don’t succeed … call it version 1.0” consulting training design debugging wintellect.com
  • 5. A Brief History of Silverlight • Silverlight 2.0 • 2008 • Common Language Runtime (CLR) • Dynamic Language Runtime (DLR) • Deep Zoom “The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.“ consulting training design debugging wintellect.com
  • 6. A Brief History of Silverlight • Silverlight 3.0 • 2009 • 2D-3D (“Perspective”) • GPU • Element Binding • Out of Browser “Three screens and a cloud … [a] fundamental shift in the computing paradigm.“ - Ballmer consulting training design debugging wintellect.com
  • 7. A Brief History of Silverlight • Silverlight 4.0 • 2010 • Web Cam and Microphone • HTML inside Silverlight • MEF • WCF RIA • COM • Chrome support “If brute force doesn't solve your problems, then you aren't using enough.“ consulting training design debugging wintellect.com
  • 8. A Brief History of Silverlight • Silverlight 5.0 • 2011 • Are you kidding me?! That’s what the rest of this talk is for! “Computers are incredibly fast, accurate, and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination.” – Albert Einstein consulting training design debugging wintellect.com
  • 9. Where We Are • 1 million Silverlight developers (Silverlight team blog) • 70% penetration (RIAStats.com) • Silverlight Firestarter: DayForce – “1/4th cost to build Silverlight compared to Java” – “1/30th total cost due to reduced load on servers” • Major enterprise adoption, including Fortune 500 companies consulting training design debugging wintellect.com
  • 10. Microsoft eScience “Re-write the existing Windows Forms application in both Silverlight and WPF, and to correspondingly re- create the user interface design, using as much of a single code base as possible.” consulting training design debugging wintellect.com
  • 11. 2010 Olympics Health Monitoring “Over 12 petabytes of data, and at peak loads streamed 374 gigabits of video per second and handled 2.4 million pages per second. With 82 million mobile page views, 1.9 million mobile video streams, and 5,000 hours of live and on- demand video...” consulting training design debugging wintellect.com
  • 12. PriceWaterhousecoopers SharePoint “Utilize Microsoft’s Silverlight technology to deliver interactive dashboards and onscreen reports, within an integrated SharePoint environment.” consulting training design debugging wintellect.com
  • 13. KNFB Blio eReader “The Blio project represented a challenging technical application for WPF and even more so for the Silverlight platform. An e-reader has a surprisingly large degree of complexity around user interaction, input, and rendering.” consulting training design debugging wintellect.com
  • 14. Microsoft Looking Glass “Re-work and enhance the UI design of the tool as well as re-migrate the code fully to Silverlight 4, and architect the backend code using the Model-View- View Model (MVVM) pattern to support unit testing, modularity, scalabil ity, and robustness within the application. ” consulting training design debugging wintellect.com
  • 15. Rooms to Go Silverlight Slate App “Putting our business applications on the slate device was very easy. We just identified the applications, the data used, whipped up the interface and web services and we were able to do it rather quickly.” consulting training design debugging wintellect.com
  • 16. Hooters “Eliminate Flash technology from their main web site in order to achieve an approximate order-of-magnitude increase in page load performance.” consulting training design debugging wintellect.com
  • 17. Where We are Going consulting training design debugging wintellect.com
  • 18. Miscellaneous Post-Beta Features • WS-Trust • 64-bit • Immediate-mode graphics • Hardware acceleration in windowless mode (IE9) • Direct access to USB devices • Microsoft Office integration • Full keyboard support in full screen • P/Invoke consulting training design debugging wintellect.com
  • 19. Text • Text overflow areas (multi-column text) – RichTextBoxOverflow control – Link RichTextBox to one or more RichTextBoxOverflow controls and flow text from one to the other • Controllable character spacing (leading) – CharacterSpacing property on text-input elements • Crisper text display via pixel snapping (post-beta) • Enhanced OpenType support (post-beta) consulting training design debugging wintellect.com
  • 20. Text Overflow “Overflow additional text to this element…” <RichTextBox FontSize="20" OverflowContentTarget="{Binding ElementName=ColumnTwo}"> <Paragraph>Blah, blah, blah</Paragraph> </RichTextBox> <RichTextBoxOverflow x:Name="ColumnTwo" Grid.Column="1" OverflowContentTarget="{Binding ElementName=ColumnThree}"/> <RichTextBoxOverflow x:Name="ColumnThree" Grid.Column="2"/> “I can receive overflow text…” consulting training design debugging wintellect.com
  • 21. Character Spacing <Slider Minimum="1" Maximum="100" Value="2" x:Name="SpacingSlider" ToolTipService.ToolTip="{Binding ElementName=SpacingSlider, Path=Value}" Grid.Row="1" Grid.Column="2"/> <TextBlock Margin="10" Grid.Row="2" HorizontalAlignment="Stretch" Grid.ColumnSpan="3" Height="30" CharacterSpacing="{Binding ElementName=SpacingSlider,Path=Value}" Text="Keep your eye on the text block. Things may change here!" VerticalAlignment="Top"/> “Set the leading spacing to this…” consulting training design debugging wintellect.com
  • 22. demo Text Overflow and Character Spacing consulting training design debugging wintellect.com
  • 23. Threading • Dedicated composition thread – GPU animations no longer handled on UI thread – Adapted from Silverlight for Windows Phone • Decreased network latency – HttpWebRequest calls removed from UI thread – Up to 90% less latency according to Microsoft consulting training design debugging wintellect.com
  • 24. Composition Thread “Set this…” “…and this…” <param name="enableGPUAcceleration" value="true"/> … <Rectangle CacheMode="BitmapCache" Width="100" Height="50" Fill="Red"> <Rectangle.RenderTransform> <RotateTransform x:Name="SpinLeft" /> </Rectangle.RenderTransform> </Rectangle> “…and this will run on composition the thread.” <Storyboard x:Name="LeftSpin"> <DoubleAnimation Storyboard.TargetName="SpinLeft" Storyboard.TargetProperty="Angle" From="0" To="360" Duration="0:0:1" RepeatBehavior="Forever" /> </Storyboard> consulting training design debugging wintellect.com
  • 25. demo Animations on the Composition Thread consulting training design debugging wintellect.com
  • 26. Data-Binding • Style data binding • Implicit data templates • Ancestor binding • Data binding debugging consulting training design debugging wintellect.com
  • 27. Style Data Binding <Themes:MyThemes x:Key="Theme"/> INotifyPropertyChanged class that exposes brushes, gradients <Style TargetType="Grid"> <Setter Property="Background" Value="{Binding GradientBrush,Source={StaticResource Theme}}"/> </Style> Implicit style that binds to the theme class consulting training design debugging wintellect.com
  • 28. Implicit Data Templates Implied based on the data type <Grid.Resources> <DataTemplate DataType="model:Photo"> <Templates:PhotoTemplate/> </DataTemplate> <DataTemplate DataType="model:BlogPost"> <Templates:BlogTemplate/> </DataTemplate> <DataTemplate DataType="model:Tweet"> <Templates:TweetTemplate/> </DataTemplate> No ItemTemplate: implied one is used </Grid.Resources> <ListBox ItemsSource="{Binding SocialFeed}" Background="{StaticResource DarkBackground}"/> consulting training design debugging wintellect.com
  • 29. Ancestor Binding <Button Content="Delete Post" Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Grid,AncestorLevel=3}}" Bind to the third parent in the visual tree that is a Grid CommandParameter="{Binding}"/> Binds to the current data context consulting training design debugging wintellect.com
  • 30. Data-Binding Debugging • Set breakpoints on {Binding} expressions in XAML • Analyze broken bindings, detect when target is updated, and more • Use locals window to analyze binding consulting training design debugging wintellect.com
  • 31. demo Data Binding in Silverlight 5 consulting training design debugging wintellect.com
  • 32. User Interface • Click counting • Text search • Vector-based printing consulting training design debugging wintellect.com
  • 33. Click Counting private void _ButtonMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { New click count parameter var text = "Single-click."; on MouseEventArgs if (e.ClickCount > 1) text = "Double-click."; if (e.ClickCount > 2) text = "Triple-click."; if (e.ClickCount > 3) text = string.Format("Clicked {0} times", e.ClickCount); ClickCount.Text = text; } consulting training design debugging wintellect.com
  • 34. Text Search public class ImageItem { public string Path { get; set; } public string Name { get; set; } } <ListBox ItemsSource="{Binding Images}" TextSearch.TextPath="Name"> When keyboard pressed, will match first characters of this property consulting training design debugging wintellect.com
  • 35. Printing • Vector-based • PostScript • Virtual print view • No new API, uses older method • Reduce size/footprint of print buffer • Elements sent as vectors for better fidelity when scaled or printed at higher resolutions consulting training design debugging wintellect.com
  • 36. demo Click Count and Text Search consulting training design debugging wintellect.com
  • 37. Custom Markup and Types • Custom markup extensions – Markup extensions appear in XAML in {} – Provide more flexibility for extending what XAML does – Are able to reference the targets to which they are applied • Custom types – ICustomTypeProvider – “Go the way of reflection…” – The dynamic types that bind consulting training design debugging wintellect.com
  • 38. Custom Markup Inherit MarkupExtension (the Extension word goes away in XAML) public class ViewModelGlueExtension : MarkupExtension Implement this method and return what you need. public override object ProvideValue(IServiceProvider serviceProvider) { Optionally reach out and grab the target object/property var ipvt = serviceProvider.GetService(typeof(IProvideValueTarget)) as IProvideValueTarget; var targetObject = ipvt.TargetObject; } Then reference and use as needed. DataContext="{jounce:ViewModelGlue ViewModelName=CustomViewModel}" consulting training design debugging wintellect.com
  • 39. Custom Type Provider Inherit ICustomTypeProvider public class CustomType : ICustomTypeProvider Only one method – but this is where the work is! public Type GetCustomType() { return _helper.GetCustomType(); } Now get your dynamic on! CustomType.AddProperty(“Age”, typeof(int)); var type = new CustomType(); type.SetPropertyValue(“Age”, 36); Totally bindable, dude! consulting training design debugging wintellect.com
  • 40. demo Custom Markup Extension and Custom Type Provider consulting training design debugging wintellect.com
  • 41. Trusted Applications • Can now run inside the browser – Requires permissions (localhost excepted) – Can host WebBrowser controls in-browser, too • Can now create multiple windows – Modeless dialogs, tear-off windows, and more – Only available to trusted out-of-browser apps • Can now access entire file system consulting training design debugging wintellect.com
  • 42. Child Window new Window FrameworkElement { Content = child, Width = 450, Layer on top of other active windows Height = 400, Title = title, TopMost = true, Visibility = Visibility.Visible }; Defaults to Collapsed consulting training design debugging wintellect.com
  • 43. demo Child Windows consulting training design debugging wintellect.com
  • 44. The Third Dimension • Silverlight 5 includes robust 3D support – Hardware (GPU) accelerated – Immediate-mode XNA-based API – Built-in shaders/effects coming post-beta – Supports textures, bump mapping, etc. • DrawingSurface control represents 3D canvas – Draw event signals opportunity to redraw • Requires Shader Model 2.0-compatible hardware • Requires consent or trust on Windows XP consulting training design debugging wintellect.com
  • 45. 3D Models • Models are formed from meshes of 3D triangles – Define vertices using X-Y-Z coordinates – Connect vertices to form triangles – Connect triangles to form meshes • Triangles can be shaded with colors or textures consulting training design debugging wintellect.com
  • 46. demo The Third Dimension consulting training design debugging wintellect.com
  • 47. Resources • Silverlight 5 http://www.microsoft.com/silverlight/future • Jounce MVVM/MEF Framework http://jounce.codeplex.com/ • My Blog & Twitter http://csharperimage.jeremylikness.com/ @JeremyLikness consulting training design debugging wintellect.com
  • 48. Questions? Jeremy Likness Project Manager, Senior Consultant [email protected] consulting training design debugging wintellect.com

Editor's Notes

  • #5: So where is Silverlight today?
  • #6: So where is Silverlight today?
  • #7: So where is Silverlight today?
  • #8: So where is Silverlight today?
  • #9: So where is Silverlight today?
  • #10: So where is Silverlight today?
  • #23: DEMO: Show the TextOverflowDemo project.
  • #26: DEMO: Show the TextOverflowDemo project.
  • #32: DEMO: Show the TextOverflowDemo project.
  • #37: DEMO: Show the TextOverflowDemo project.
  • #41: DEMO: Show the TextOverflowDemo project.
  • #44: DEMO: Show the TextOverflowDemo project.
  • #47: DEMO: Show the TextOverflowDemo project.