6
shouts

RelativeSource binding in Silverlight

published 381 days, 15 hours, 52 minutes ago posted by faisalhossainfaisalhossain 381 days, 21 hours, 59 minutes ago
Monday, March 02, 2009 2:35:44 PM GMT Monday, March 02, 2009 8:29:39 AM GMT

In my previous post I demonstrated how an the WPF ElementName style binding can be emulated with Silverlight via an attached behaviour. As a brief recap, the technique involved creating an attached property, which when bound, adds a handler for the elements Loaded event. When the element is loaded, the even handler locates the named element and constructs a binding via a relay object. Here is the attached property in use:

category: Silverlight | clicked: 55 | | source: www.scottlogic.co.uk | show counter code
tags: C#, XAML