Scott Logic

Developing a (very) Lookless Silverlight Radial Gauge Control

August 19th, 2010
This blog post describes the development of a lookless radial gauge control. In this post I will explore the use of an attached view model in order to move view specific properties and logic out of the control code in order to give a truly lookless control. Today I had to get up far too early [...]

Silverlight MultiBinding updated, adding support for ElementName and TwoWay binding

August 12th, 2010
This blog post describes an update to the Silverlight 4 MultiBinding technique I blogged about a couple of months ago to add support for ElementName binding and TwoWay binding. A few months ago I posted an update to my MultiBinding solution for Silverlight 4. This technique allows you to perform the same kind of multibindings which [...]

Exposing and Binding to a Silverlight ScrollViewer’s Scrollbars

July 21st, 2010
The Silverlight ScrollViewer exposes readonly properties which indicate the current vertical and horizontal scroll offset, and methods for setting the current offset. In this blog post I demonstrate a simple attached behaviour that exposes these offsets as read / write dependency properties allowing them to be bound to. The Silverlight ScrollViewer is a very useful control, [...]

A Universal Value Converter for WPF

July 9th, 2010
This post provides a simple IValueConverter implementation that makes use of the framework type converters in order to convert between a large range of source / target types. This converter can be used both within bindings and in code-behind to give more concise property setters. Introduction One of the great features of the XAML language is that [...]

Modal dialogs in cross-platform WPF/Silverlight applications

June 18th, 2010
This blog post looks at the problem of showing modal dialog windows in applications that target both the Silverlight and WPF platforms. A solution is provided which allows modal dialogs to be written that work well for both technologies. Silverlight is, roughly speaking, a subset of Windows Presentation Foundation (WPF). This means that it is possible [...]

Throttling Silverlight Mouse Events to Keep the UI Responsive

June 14th, 2010
If your Silverlight application performs intensive updates to the UI during mouse events, the UI can freeze because it is invalidated before it has a chance to render. This post describes a technique for ‘throttling’ mouse events to ensure that each time an event occurs, the UI has the opportunity to render. Introduction – the problem The [...]

Silverlight MultiBinding solution for Silverlight 4

May 10th, 2010
In this post I describe an update to the Silverlight MultiBinding solution I presented last year. This update includes support for Silverlight 4, attached properties and multiple bindings on a single object. MultiBinding is a WPF feature that allows you to bind a single property to a number of sources, with the source values being combined [...]

Ineffective Data Visualisation … and how to fix it

April 30th, 2010
This blog post looks at a recently published set of charts in a UK newspaper and how they fail to help in the comprehension of the data which they visualise. I will also look at much more effective ways of displaying this same data. At Scott Logic we tend to spend quite a bit of our [...]

Binding a Silverlight 3 DataGrid to dynamic data via IDictionary (Updated)

March 26th, 2010
In this post I demonstrate a method for binding a Silverlight 3 DataGrid to dynamic data, i.e. data which does not have properties that are known at design time. This technique results in a bound grid which is sortable and editable. This blog post is a bug fix (due to differences between SL2 and SL3) [...]

Linq to Visual Tree

March 4th, 2010
This blog post demonstrates a Linq API which can be used to query the WPF / Silverlight Visual Tree. You can find a few other Linq to Visual Tree techniques on other blogs, but what makes this one unique is that it retains, and allows queries that make use of the tree like structure rather [...]