More Related Content
Similar to What's new in Silverlight 5 (20)
More from LearnNowOnline (9)
What's new in Silverlight 5
- 1. What’s New in Silverlight 5
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 2. What’s New In Silverlight 5
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 3. What’s New In Silverlight 5
• Data Binding Improvements
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 4. What’s New In Silverlight 5
• Data Binding Improvements
• Text
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 5. What’s New In Silverlight 5
• Data Binding Improvements
• Text
• Controls
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 6. What’s New In Silverlight 5
• Data Binding Improvements
• Text
• Controls
• Media
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 7. What’s New In Silverlight 5
• Data Binding Improvements
• Text
• Controls
• Media
• Trusted Applications
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 8. Data binding improvements
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 9. Data binding improvements
• Data binding debugging
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 10. Data binding improvements
• Data binding debugging
• Ancestor RelativeSource binding
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 11. Data binding improvements
• Data binding debugging
• Ancestor RelativeSource binding
• Implicit data templates
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 12. Data binding improvements
• Data binding debugging
• Ancestor RelativeSource binding
• Implicit data templates
• UpdateSourceTrigger=PropertyChange
d
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 13. Data binding improvements
• Data binding debugging
• Ancestor RelativeSource binding
• Implicit data templates
• UpdateSourceTrigger=PropertyChange
d
• Binding in style setters
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 14. Data binding improvements
• Data binding debugging
• Ancestor RelativeSource binding
• Implicit data templates
• UpdateSourceTrigger=PropertyChange
d
• Binding in style setters
• Custom markup extensions
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 15. Data binding improvements
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 16. Data binding improvements
• These updates are very welcome
changes for developers using MVVM in
their applications
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 17. Model-View-ViewModel
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 18. Model-View-ViewModel
• It’s a separation pattern, like MVC or
MVP
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 19. Model-View-ViewModel
• It’s a separation pattern, like MVC or
MVP
• Improves structure / separation of
concerns
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 20. Model-View-ViewModel
• It’s a separation pattern, like MVC or
MVP
• Improves structure / separation of
concerns
• Enables better designer / developer
workflow
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 21. Model-View-ViewModel
• It’s a separation pattern, like MVC or
MVP
• Improves structure / separation of
concerns
• Enables better designer / developer
workflow
• Enhances testability
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 22. Model-View-ViewModel
• It’s a separation pattern, like MVC or
MVP
• Improves structure / separation of
concerns
• Enables better designer / developer
workflow
• Enhances testability
• Made possible by the robust data
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 23. MVVM Structure
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 24. MVVM Structure
View
••XAML
••Data bindings
View Model
••Model of the View (or View of the Model)
••Properties and commands
Model
••Domain model / business logic
••Services, persistence, everything else
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 25. Connecting the pieces of
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 26. Connecting the pieces of
• View -> ViewModel
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 27. Connecting the pieces of
• View -> ViewModel
• ViewModel exposes properties and
commands that the view binds to
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 28. Connecting the pieces of
• View -> ViewModel
• ViewModel exposes properties and
commands that the view binds to
• ViewModel implements
INotifyPropertyChanged to relay change
notifications to View
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 29. Connecting the pieces of
• View -> ViewModel
• ViewModel exposes properties and
commands that the view binds to
• ViewModel implements
INotifyPropertyChanged to relay change
notifications to View
• The View’s DataContext is bound to the
ViewModel, making all of it’s properties
and commands available to the entire
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 30. Connecting the pieces of
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 31. Connecting the pieces of
• ViewModel -> View
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 32. Connecting the pieces of
• ViewModel -> View
• ViewModel contains domain objects from
the Model and exposes relevant portions
of it to the View
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 33. Connecting the pieces of
• ViewModel -> View
• ViewModel contains domain objects from
the Model and exposes relevant portions
of it to the View
• ViewModel calls services to fetch or save
data to the Model
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 34. Key elements of MVVM
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 35. Key elements of MVVM
• INotifyPropertyChanged
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 36. Key elements of MVVM
• INotifyPropertyChanged
• PropertyChanged event
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 37. Key elements of MVVM
• INotifyPropertyChanged
• PropertyChanged event
• ICommand
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 38. Key elements of MVVM
• INotifyPropertyChanged
• PropertyChanged event
• ICommand
• Execute
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 39. Key elements of MVVM
• INotifyPropertyChanged
• PropertyChanged event
• ICommand
• Execute
• CanExecute
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 40. Key elements of MVVM
• INotifyPropertyChanged
• PropertyChanged event
• ICommand
• Execute
• CanExecute
• CanExecuteChanged event
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 41. DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 42. MVVM Basics
DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 43. Data binding debugging
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 44. Data binding debugging
• Allows breakpoints on data binding
statements
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 45. Data binding debugging
• Allows breakpoints on data binding
statements
• Exposes information on the data
binding source, errors, etc…
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 46. Data binding debugging
• Allows breakpoints on data binding
statements
• Exposes information on the data
binding source, errors, etc…
• Makes troubleshooting data binding
issues really easy!
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 47. DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 49. Ancestor RelativeSource
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 50. Ancestor RelativeSource
• New binding mode brought over from
WPF
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 51. Ancestor RelativeSource
• New binding mode brought over from
WPF
• Allows a child element to bind to
properties on its parent
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 52. Ancestor RelativeSource
• New binding mode brought over from
WPF
• Allows a child element to bind to
properties on its parent
• Very useful within item templates in an
items control
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 53. DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 55. Implicit data templates
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 56. Implicit data templates
• Another binding feature from WPF
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 57. Implicit data templates
• Another binding feature from WPF
• Defines a template to be used
whenever Silverlight tries to display a
particular type
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 58. Implicit data templates
• Another binding feature from WPF
• Defines a template to be used
whenever Silverlight tries to display a
particular type
• In Silverlight 4, we had to explicitly
specify a template for our custom
types
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 59. Implicit data templates
• Another binding feature from WPF
• Defines a template to be used
whenever Silverlight tries to display a
particular type
• In Silverlight 4, we had to explicitly
specify a template for our custom
types
• Very useful when binding to a list of
different subclasses – not limited to a
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 60. DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 62. New UpdateSourceTrigger
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 63. New UpdateSourceTrigger
• Adds “PropertyChanged” option to
available UpdateSourceTriggers – also
from WPF
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 64. New UpdateSourceTrigger
• Adds “PropertyChanged” option to
available UpdateSourceTriggers – also
from WPF
• When used, the source of the binding
(on our ViewModel) is updated
whenever the property on the View is
changed
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 65. DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 67. Custom markup extensions
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 68. Custom markup extensions
• Markup extensions are the parts of
XAML that are surrounded by {curly
braces}
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 69. Custom markup extensions
• Markup extensions are the parts of
XAML that are surrounded by {curly
braces}
• Binding, StaticResource,
DynamicResource, etc…
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 70. Custom markup extensions
• Markup extensions are the parts of
XAML that are surrounded by {curly
braces}
• Binding, StaticResource,
DynamicResource, etc…
• They provide a value – one that is often
not known until runtime
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 71. Custom markup extensions
• Markup extensions are the parts of
XAML that are surrounded by {curly
braces}
• Binding, StaticResource,
DynamicResource, etc…
• They provide a value – one that is often
not known until runtime
• Silverlight 5 now allows us to create
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 72. DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 74. Binding in Style Setters
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 75. Binding in Style Setters
• Styles are useful and widely used to
define a consistent look and feel to our
applications
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 76. Binding in Style Setters
• Styles are useful and widely used to
define a consistent look and feel to our
applications
• Until now, binding in the setters within
styles were now allowed
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 77. Binding in Style Setters
• Styles are useful and widely used to
define a consistent look and feel to our
applications
• Until now, binding in the setters within
styles were now allowed
• Silverlight 5 allows us to create binding
statements within stlyes
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 78. DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 79. Binding in style setters
DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 80. What’s New In Silverlight 5
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 81. What’s New In Silverlight 5
• Data Binding Improvements
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 82. What’s New In Silverlight 5
• Data Binding Improvements
• Text
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 83. What’s New In Silverlight 5
• Data Binding Improvements
• Text
• Controls
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 84. What’s New In Silverlight 5
• Data Binding Improvements
• Text
• Controls
• Media
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 85. What’s New In Silverlight 5
• Data Binding Improvements
• Text
• Controls
• Media
• Trusted Applications
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 86. Text improvements
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 87. Text improvements
• Character spacing and line height
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 88. Text improvements
• Character spacing and line height
• TextOptions – pixel snapping
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 89. Text improvements
• Character spacing and line height
• TextOptions – pixel snapping
• OpenType support
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 90. Text improvements
• Character spacing and line height
• TextOptions – pixel snapping
• OpenType support
• Linked text blocks for multi-column
and flowing text
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 91. Character spacing and line
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 92. Character spacing and line
• “CharacterSpacing” and “LineHeight”
properties
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 93. Character spacing and line
• “CharacterSpacing” and “LineHeight”
properties
• TextBox, TextBlock, RichTextBox,
RichTextBlock
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 94. Character spacing and line
• “CharacterSpacing” and “LineHeight”
properties
• TextBox, TextBlock, RichTextBox,
RichTextBlock
• CharacterSpacing calculated based
formula:
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 95. Character spacing and line
• “CharacterSpacing” and “LineHeight”
properties
• TextBox, TextBlock, RichTextBox,
RichTextBlock
• CharacterSpacing calculated based
formula:
Spacing (in pixels) = (font size * Value) / 1000
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 96. Character spacing and line
• “CharacterSpacing” and “LineHeight”
properties
• TextBox, TextBlock, RichTextBox,
RichTextBlock
• CharacterSpacing calculated based
formula:
Spacing (in pixels) = (font size * Value) / 1000
• LineHeight is the spacing between
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 97. Linked text
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 98. Linked text
• RichTextBlocks can now specify a
RichTextBlockOverflow element that
text will flow to when full
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 99. Linked text
• RichTextBlocks can now specify a
RichTextBlockOverflow element that
text will flow to when full
• RichTextBlockOverflow elements can
specify additional overflow containers
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 100. Linked text
• RichTextBlocks can now specify a
RichTextBlockOverflow element that
text will flow to when full
• RichTextBlockOverflow elements can
specify additional overflow containers
• Limited only to read-only
RichTextBlocks
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 101. DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 102. Linked text, character spacing and line height
DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 103. TextOptions
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 105. TextOptions
• TextFormattingMode
• Ideal, Display (pixel snapping)
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 106. TextOptions
• TextFormattingMode
• Ideal, Display (pixel snapping)
• TextHintingMode
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 107. TextOptions
• TextFormattingMode
• Ideal, Display (pixel snapping)
• TextHintingMode
• Fixed, Animated
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 108. TextOptions
• TextFormattingMode
• Ideal, Display (pixel snapping)
• TextHintingMode
• Fixed, Animated
• TextRenderingMode
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 109. TextOptions
• TextFormattingMode
• Ideal, Display (pixel snapping)
• TextHintingMode
• Fixed, Animated
• TextRenderingMode
• Auto, Aliased, Greyscale, ClearType
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 110. OpenType Support
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 111. OpenType Support
• Ligatures – glyphs with more than one
letter
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 112. OpenType Support
• Ligatures – glyphs with more than one
letter
• Contextual Alternates
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 113. OpenType Support
• Ligatures – glyphs with more than one
letter
• Contextual Alternates
• Stylistic Sets
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 114. OpenType Support
• Ligatures – glyphs with more than one
letter
• Contextual Alternates
• Stylistic Sets
• Variants – superscript and subscript
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 115. OpenType Support
• Ligatures – glyphs with more than one
letter
• Contextual Alternates
• Stylistic Sets
• Variants – superscript and subscript
• Fractions
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 116. OpenType Support
• Ligatures – glyphs with more than one
letter
• Contextual Alternates
• Stylistic Sets
• Variants – superscript and subscript
• Fractions
• Much more in the Typography class!
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 117. DEMO
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 119. What’s New In Silverlight 5
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 120. What’s New In Silverlight 5
• Data Binding Improvements
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 121. What’s New In Silverlight 5
• Data Binding Improvements
• Text
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 122. What’s New In Silverlight 5
• Data Binding Improvements
• Text
• Controls
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 123. What’s New In Silverlight 5
• Data Binding Improvements
• Text
• Controls
• Media
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 124. What’s New In Silverlight 5
• Data Binding Improvements
• Text
• Controls
• Media
• Trusted Applications
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 125. What’s New in Silverlight 5
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 126. Learn More!
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
- 127. Learn More!
• This is an excerpt from a larger course. Visit
www.learnnowonline.com for the full details!
Learn More @ http://www.learnnowonline.com
Copyright © by Application Developers Training Company
Editor's Notes
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- DEMO: rest of section\n