Silverlight Tab Stops – IsTabStop

Just found a tricky little quirk with TabStop that caused a fair bit of confusion. It turns out that the default implementation of ContentControl overrides Control, so implements the IsTabStop property, and defaults that value to true. ContentControl is implemented by the delightful BusyIndicator, so if you have used a BusyIndicator within the scope of... Continue Reading →

Silverlight Commands – Data grid row selected

following on from http://thoughtjelly.blogspot.com/2009/09/silverlight-prism-commands-textchanged.html and in response to John Papa’s PDC talk http://johnpapa.net/silverlight/mvvm-and-prism-demo-for-pdc09-silverlight-session. 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 →

Date issues in Silverlight

Seeing some strange date behaviours in SL UI components. My local culture is UK but we keep seeing US dates popping up “here and there”. Have tried setting the Language= “en-GB” in the upper most control, also setting the thread culture is not effecting across the app. Going to have to get help on this... Continue Reading →

Cross Project MergedDictionaries in Silverlight

Todd Miranda has posted a video on the use of merged dictionaries on the Learning portal of Silverlight.net (find it here). This video explains the concepts of MergedDictionaries in a very long winded way. IMHO people investigating MergedDictionaries will already know how to layout a grid, and play some simple controls, so the first 8m... Continue Reading →

A WordPress.com Website.

Up ↑