The mini-ViewModel pattern
August 7th, 2009
The construction of a ViewModel is often seen as the standard technique for solving binding problems within WPF and Silverlight. However, the addition of a ViewModel adds complexity to your code. This post describes an alternative method where a mini-ViewModel is applied directly to the problem areas in the view, leaving the rest to use [...]
Exposing Bindings as Properties of a Control
June 19th, 2009
I must admit that the title of this post is not entirely clear, however I couldn’t find a way to sum up the content in one short sentence, so we’ll dive straight into an example. Let’s say for example you have developed a funky little business-card as illustrated above, using the simple XAML below:
<Border BorderBrush="LightGray" [...]
Dependency Property Performance and Lissajous Figures
June 2nd, 2009
A few night ago I was working on a Siverlight control which renders some quite complex Paths, the geometry of which is determined from a number of dependency properties. In order to gain UI coolness points I wanted to animate the dependency properties in order to see a smooth transition of the Path [...]
Binding a Silverlight DataGrid to dynamic data Part 2 – editable data and INotifyPropertyChanged
April 22nd, 2009
In my previous blog post I described a method for solving the commonly faced problem of binding a Silverlight DataGrid to dynamic data, the form of which is not know at compile time. This blog post extends on the method previously described, adding change notification, allowing the DataGrid to synchronise the UI with changes to [...]
Binding a Silverlight DataGrid to dynamic data via IDictionary
April 17th, 2009
This post demonstrates a technique for binding a Silverlight DataGrid to dynamic data, the structure of which is not know at compile-time …
Update: I have extended this technique to add include change notification so that the DataGrid can be made editable. Read all about it in part two.
With Silverlight binding data to a DataGrid [...]
Implementing RelativeSource binding in Silverlight
February 27th, 2009
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 [...]
ElementName binding in Silverlight via Attached Behaviours
February 22nd, 2009
As a relative newcomer to Silverlight I was happily greeted by the warm feeling of familiarity when I started developing. It is surprisingly easy to make the transition from WPF to Silverlight developer, with most of the core concepts being just the same. However, there are some parts of the WPF framework that you start [...]
