Knowledge: Tech Blog

Where we share our thoughts on technology and design.

WPF

Nicholas Wolverson

Snooping WPF: Tips and PowerShell tricks

When moving back from web to desktop development, it’s easy to miss the quick feedback and update cycle enabled by the developer tools in modern web browsers. To an extent the debugger intermediate window does many of the things the console allows, and many of the “script debugging” features the...

Chris Grant

Creating a Telemetry Application using Silverlight, Visiblox and Custom Controls

Introduction About a month ago, I was using the MoTeC i2 Data Analysis software to look through some telemetry data that I had exported from a popular racing simulator game. Although MoTeC is feature rich and a great tool for motor racing professionals and enthusiasts, I had the idea...

Chris Grant

Creating an Earthquake Monitoring Application with Visiblox

This post describes how to develop an Earthquake Monitor application based on live data from the USGS, using Silverlight, the MVVM Pattern, Visiblox and the Silverlight Bing Maps Interactive SDK.

Nicholas Wolverson

Mapping in WPF, Silverlight and WP7

In this article I show a simple example of integrating Bing and Google mapping into in WPF, Silverlight, and Windows Phone applications. I was inspired to investigate how easy it is to get up and running with maps on these platforms when I saw how similar the Bing APIs are...

Colin Eberhardt

WPF Charting Performance Comparisons (the Battle Continues)

This blog post presents a thorough analysis of the performance of various WPF Charting components. The results show that a new class of charting solutions, which use raster-based graphics as opposed to retained mode vector graphics, provide a considerable performance advantage

Colin Eberhardt

Everything you wanted to know about databinding in WPF, Silverlight and WP7 (Part Two)

Introduction This is the second post in my series about databinding in Silverlight and WPF. In the first post I looked at how you wire-up UI controls to a model in the absence of a databinding framework. I showed how databindings can be created in code-behind, removing the need...

Colin Eberhardt

Everything you wanted to know about databinding in WPF, Silverlight and WP7 (Part One)

OK, so the title is a little ambitious, but there is nothing wrong with setting yourself lofty aims! Because of the depth of this topic I have decided to split this tutorial up into a series of blog posts, each of which explore a different aspect of the binding framework....

Colin Eberhardt

A Simple Pattern for Creating Re-useable UserControls in WPF / Silverlight

This blog post provides step-by-step instructions for creating a user control, which exposes bindable properties, in WPF and Silverlight. The post covers dependency properties, and how to manage DataContext inheritance. When building user interfaces you will often find yourself repeating the same UI patterns across your application. After all, users...

Colin Eberhardt

Adding Error Bars to Visiblox Silverlight Charts

Having spent a number of years studying Physics at university, I have had the importance of error bars well and truly drummed into me! Within physics, or any experimental science, there are always going to be errors in the measurements you make. The more repeat measurements you make, the more...

Nicholas Wolverson

Plotting user functions with Visiblox

Some time ago I wrote about plotting mathematical functions with Visiblox Charts, and Jesse responded by showing how to wrap a function in a data series to feed into a chart. I'm going to show how to take this idea a bit further, generating additional data on interaction,...

Colin Eberhardt

XAML Finance - a cross-platform WPF, Silverlight, WP7 application

I have just published a new article on codeproject which describes the development of XAMLFinance, a cross-platform application for the desktop (WPF), web (Silverlight) and phone (WP7). Head over to codeproject to read about the development of...

Colin Eberhardt

Visiblox MVP Giveaway

Readers of my blog will probably have noticed that I have a keen interest in both charting and performance. My friends over at Visiblox have combined these both to create what is one of the fastest charts for WPF, Silverlight and Windows Phone 7, see my recent benchmark...

Nicholas Wolverson

Mathematical-style plots: Retemplating Visiblox Charts

This post demonstrates how to re-template a Visiblox Chart to render data with mathematical-style "on-chart" axes. Mathematical charts are usually drawn around the zero point, with the X and Y axes crossing at 0,0, and the plot drawn on top of the axes. In other fields, quantities which are never...

Colin Eberhardt

MVVM Charting - Binding Multiple Series to a Visiblox Chart

This post describes a method of using attached properties to bind a ViewModel which contains multiple data series to a Visiblox chart without any code-behind. The Visiblox chart supports databinding in both WPF and Silverlight, where the X and Y...

Colin Eberhardt

Automatically Showing ToolTips on a Trimmed TextBlock (Silverlight + WPF)

Both WPF and Silverlight have a property TextTrimming="WordEllipsis", which trims the text that a TextBlock displays based on the available width. This blog post describes a simple method for automatically showing the full text as a tooltip whenever the text is trimmed. This is presented as an attached behaviour and...

Colin Eberhardt

A Navigator Control For Visiblox Time Series Charts

In this blog post I will describe the creation of a simple range selector UserControl, which can be used alongside a Visiblox chart to create an interactive navigator for time series data. Whether you are studying finance, politics, meteorology or sociology you are sure to encounter time series data. Time...

Colin Eberhardt

A Simplified Grid Markup for Silverlight and WPF

The WPF / Silverlight syntax is long and cumbersome. This blog post describe a simple attached property that allows you to specify row and column widths / heights as a simple comma separated list, e.g. RowDefinitions="Auto,,3*,,,,2*" The Grid is probably one of the most useful and versatile layouts that Silverlight...

Colin Eberhardt

Visiblox Charts vs. amCharts Quick Charts

Around one week ago I published an article which compared the performance of Visibox charts to a few of its competitors. The results indicated that Visiblox was the fastest chart, with DynamicDataDisplay coming in a very close second. UPDATE: I have published a more up-to-date and...

Colin Eberhardt

Visiblox, Visifire, DynamicDataDisplay - Charting Performance Comparison

A few weeks ago I published a blog post which compared the performance of the Visiblox charts and the Silverlight Toolkit charts. The results indicated that the Visblox charts are considerably faster than the Toolkit charts, however Microsoft's David Anson did point out that the Toolkit charts...

Colin Eberhardt

Adding a Smoothed Line Series (Bézier curve) to a Visiblox Chart

In this blog post I look at how to add a new series type to the Visiblox charts by creating my own series type which renders a smoothed line using a Bézier curve. This blog post describes how to create a new series type for the Visiblox charts, a...

Colin Eberhardt

Visiblox Charts vs. Silverlight Toolkit Charts - a test of Performance

This blog post compares the performance of the Visiblox and Silverlight Toolkit charts using a simple image processing tool to test and illustrate their differences in performance. The results show that the Visiblox charts are approximately 50 - 100 times faster that the Silverlight Toolkit charts. UPDATE:...

Colin Eberhardt

White Paper: Silverlight, WPF and Windows Phone 7 cross platform development

Last week I gave a presentation at a joint Scott Logic / Microsoft event about how WPF and Silverlight are unifying the development platform for desktop, web and mobile. To accompany the talk I wrote a white paper which delves into this subject in a little more detail. You...

Colin Eberhardt

Templates, or Why I love WPF (and Silverlight Too!)

This post compares the implementation of a simple ListBox layout with Windows Forms and Windows Presentation Foundation. The use of Templates within WPF are a clear winner over the WinForms 'owner draw' route. Application user interfaces are becoming much more graphical, with users expecting a more engaging and 'lively' experience....

Colin Eberhardt

A Universal Value Converter for WPF

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...

Colin Eberhardt

Modal dialogs in cross-platform WPF/Silverlight applications

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)....

Colin Eberhardt

Declarative Dependency Property Definition with T4 + DTE

UPDATE I have published a more up-to-date version of this code on codeproject, which allows you to automate the generation of much more than just dependency properties. This blog post describes a technique for specifying WPF / Silverlight Dependency Properties declaritively via attributes as illustrated by the following example:...

Colin Eberhardt

Silverlight 3 UK launch ... and the future of WPF?

A brief article on the launch of Silverlight 3 and why the interest in Silverlight is eclipsing that of WPF. The excitement behind Silverlight has been gaining in momentum throughout this year, with one of the highpoints being the MIX09 conference in March this year where the announcement of...

Colin Eberhardt

Dependency Property Performance and Lissajous Figures

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...

Colin Eberhardt

New codeproject article on WPF, Silverlight + T4 Templates

I have just finished a new article on CodeProject - Generate WPF and Silverlight Dependency Properties using T4 Templates

Colin Eberhardt

Silverlight Dependency Property Code Generation

This blog details a technique for generating Silverlight dependency properties from an XML file via a T4 template. If you just want to grab the code, scroll to the bottom of this article and download the sourcecode or cut and paste the templates. If you want to find out how...

Colin Eberhardt

Using CSS Selectors for Styling in WPF

When I first encountered WPF I was really impressed by its styling and templating features which are more powerful than anything else I had previously seen for desktop software development. The property-value pairing within styles instantly reminded me of CSS, however the WPF styles lack the most powerful feature of...

Colin Eberhardt

ElementName binding in Silverlight via Attached Behaviours

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...

Colin Eberhardt

Styling hard-to-reach elements in control templates with attached behaviours

OK, the title of this blog post is not very snappy, but it is not an easy problem to describe in a few short words. Here's the rub, the WPF DataGrid has a select-all button located in the top-left corner, just like Excel and many other grid controls / applications....

Colin Eberhardt

BindingGroups for Total View Validation

Over the weekend Sacha published a new article on codeproject, Total View Validation (does Sacha ever sleep?). This article addresses some of the perceived problems with the WPF binding framework, firstly, that the standard solution of using the ValidatesOnDataErrors property forces you to place validation logic into your...

Colin Eberhardt

WPF DataGrid - Committing changes cell-by-cell

In my recent codeproject article on the DataGrid I described a number of techniques for handling the updates to DataTables which are bound to the grid. These examples all worked on the assumption that you want to keep your database synchronised with the DataGrid, with changes being committed on...

Colin Eberhardt

WPF DataGrid - detecting the column, cell and row that has been clicked

The WPF DataGrid is a very flexible tool, however in its current state certain simple tasks can prove to be rather tricky. A fairly common task when working with DataGrid is detecting which row, or cell a user has clicked on, or whether they clicked a column header. You might...

Colin Eberhardt

Using BindingGroups for greater control over input validation

In a recent post on his blog Josh Smith described a technique for providing more meaningful error messages when the type conversion process fails within the binding framework. Consider the following problem; you bind an integer property of your object (Age for example) to a TextBox within your user interface....

Colin Eberhardt

Multiselect DataGrid with CheckBoxes

I am currently very interested in the new WPF DataGrid which was released on codeplex recently. Someone posted an interesting question in the codeplex forums asking about whether it would be possible to configure the DataGrid so that a user can make multiple row selections via checkboxes which...