Silverlight 5 Features Ancestor Relative Source Binding

Silverlight 5 has another new feature called Ancestor Relative source binding. It was already available in WPF and has been newly introduced in Silverlight 5 beta. Using this, you can now bind to the relative ancestor elements very easily.   Let's discuss it with a small example where we will create a Control Template for a Button and bind it's Tag property to the actual element to display text, instead of setting the Content property. Read to know more.     Let us create a simple basic style for a button. For our example, we will not use any visually stunned button style. So, our button will just look like a TextBlock. Let's create the style with a TextBlock control as shown below:   <Style x:Key="ButtonStyle" TargetType="Button"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> ...


Read more at: Original Source