Silverlight Commands – Data grid row selected

following on from and in response to John Papa’s PDC talk Another highly useful command behaviour is for DataGridRowSelected. This also gets over the issues described here and here. The code (as written by John Papa) is: public class DataGridRowSelectedCommandBehavior : CommandBehaviorBase{public DataGridRowSelectedCommandBehavior(DataGrid selectableObject): base(selectableObject){selectableObject.SelectionChanged += OnSelectionChanged;}private void OnSelectionChanged(object sender, SelectionChangedEventArgs e){this.CommandParameter =... Continue Reading →

Data-binding Radio Buttons in Silverlight to Enum

In Silverlight there is no Enum.Getvalue() method, so there is not out-of-the box way of databinding a radio buttongroup to an enumerable value in a viewmodel. Step forward converters. using System;using System.Windows.Data;namespace YourNamespace{ public class EnumBoolConverter : IValueConverter{ #region Methods public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture){ if (value == null ||... Continue Reading →

New Silverlight Juicyness

Only 3 months after the release of SL3 comes the beta for SL4.  And to be honest it just gets better and better. Following on from David Poll’s excellent PDC session (Building Line Of Business Applications with Silverlight 4) the following bits really got my juices flowing!; “Learn about enhancements to data binding and data... Continue Reading →

A Website.

Up ↑