11. layout system
Many items in one cell
Items occupying many cells
Layout Panels
Grid
StackPanel
Canvas
Custom
Proportional, fixed or “right” sized
rows/columns
12. layout system
alignment
content alignment
alignment
Margin Padding
15. built-in animation system
• Animation is driven by Storyboards
Storyboard BeginTime Repeat Duration ...
From To By ...
BeginTime Repeat Duration ...
DoubleAnimation
From To By ...
ColorAnimation BeginTime Repeat Duration ...
From To By ...
PointAnimation BeginTime Repeat Duration ...
From To By ...
etc
> animations can apply easing functions
> ~10 built-in (e.g. sine) + custom
16. resources and styles
• Elements have a dictionary of resources identified by Key
• Can store arbitrary objects, not just UI objects
• {StaticResource} XAML directive does hierarchical lookup
• Code can access local element’s Resources dictionary
resources
• Styles contain setters for Properties and Values
• Styles can derive from other styles
• Styles are applied explicitly by key or implicitly
styles • Can be changed dynamically to theme an application
17. databinding
Grid • Elements have a DataContext
• Resolution of declarative bindings is done by hierarchically
Button examining an element’s DataContext
24. apps interop with the browser
• From .NET
– access the plugin settings
– access the browser info
– access the HTML Page
– access to the HTML Window
– access the HTML DOM
– access the Javascript engine
Silverlight
• From Javascript
– access the plugin object
– access registered .NET types Silverlight
– access objects in visual tree
• Silverlight Silverlight
– secure x-app communication
– spans browser instances
– includes out-of-browser apps
27. apps interop with the machine
• read/write files
– isolated storage
– via explicit open/save file dialogs
– without dialogs
• detect network status &
changes
• display notification windows
• access the local clipboard
• access a webcam/microphone
• print via a print dialog
• act as a drop target for files
• call local COM code