Introduced
Silverlight 4.0 Binding-related enhancements:
* DependencyObject Binding-new support for DependencyObject bindings
* Indexer Binding-new support for indexer bindings
* StringFormat-Specify the display format of the bound data
* Targetnullvalue-The value to display when the bound data is null
* Fallbackvalue-The value to display when the binding fails (cannot return a value)
* CollectionViewSource-Implements a Icollectionview class that allows you to sort, filter, and group data
Online Demo
Http://www.cnblogs.com/webabcd/archive/2010/08/09/1795417.html
Example
1. Demonstrates how to bind to DependencyObject
Dependencyobjectbinding.xaml
Code
<navigation:page x:class= "Silverlight40.Binding.DependencyObjectBinding"
Xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"
Xmlns:d= "http://schemas.microsoft.com/expression/blend/2008"
Xmlns:mc= "http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:navigation= "Clr-namespace:system.windows.controls;assembly=system.windows.controls.navigation"
title= "Dependencyobjectbinding Page" >
<grid x:name= "LayoutRoot" >
<stackpanel horizontalalignment= "Left" >
<!--
Silverlight 3.0 supports binding to FrameworkElement
TextBox inherits from FrameworkElement
-->
<textbox text= "{Binding elementname=slider, path=value}"/>
<!--
New support for DependencyObject binding in Silverlight 4.0
RotateTransform inherits from DependencyObject
-->
<rectangle width= "height=" rendertransformorigin= "0.5, 0.5" fill= "Red" >
<Rectangle.RenderTransform>
<rotatetransform angle= "{Binding elementname=slider, path=value}"/>
</Rectangle.RenderTransform>
</rectangle >
<slider name= "Slider" height= "minimum=" "0" maximum= "360"/>
</StackPanel>
</Grid>
</navigation:Page>