Windows 7 RC and Visual Studio 2010 Beta – Hands on

A while back I posted that I had installed the Windows 7 64bit Beta on my main development machine as a dual boot with Vista and that all looked good. A couple of weeks after that post my machine inexplicably stopped booting into Vista despite my attempts to perform a repair. So I’ve been running Windows 7 now for quite a while.

This week, along with everyone else I re-paved the machine with Windows 7 RC. On top of that I installed Visual Studio 2010 Beta and also jumped through the numerous hoops to install VS2010 Team Foundation Server on a virtual Windows 2008 Server instance running on my WHS box.

So far:

  • The Windows 7 taskbar is improved by the additional key/mouse combos, e.g. Ctrl-LeftClick to quickly cycle through instances of an application.
  • Windows 7 install is still the best Windows installation ever – which is good because for a while there Windows was getting consistently worse.
  • Team Foundation Server is still a long installation process, but mainly now due just to the pre-requisites, e.g. Windows Server, IIS, SharePoint, SQL Server/Reporting Services. The install documentation is good – but it would pay to read through most of it before you install – which of course no-one (myself included) will ever do.
  • Visual Studio 2010 is looking pretty good. If the new WPF text editor is anything to go by then the new font improvements in WPF 4/DirectWrite have worked well.
  • There are typical Beta quirks in VS 2010 – it crashes occasionally, when you zoom in the editor the scroll bars also zoom (which looks most odd).
  • Visual Studio start page is so easy to customize now. This article shows how you simple toggle an option and then build whatever XAML you like for the startpage. Either just extending what’s already there or completely re-writing or re-skinning. Very cool!
  • A number of Visual Studio extensions are beginning to popup. Including editor extensions for creating Regex’s with intellisense, adding images inline with source code as well as some project templates, e.g. WPF application with tray icon.

Xceed WPF DataGrid – Part 1

Vendor Choice

Having met a number of obstacles in getting Microsoft’s WPF DataGrid control to function as I required I decided it may be prudent to look at some of the other offerings. In the past I’ve been a big fan of the DevExpress suite of WinForms controls.

However, DevExpress have been a little slow to get on the WPF bandwagon. In fact even now (April 2009) their grid control is still only in Beta (expecting release in mid 2009). That’s a two full years behind the offerings from Xceed and Infragistics – what were they thinking!? Even if they did release now I’m really not sure I want to be working with a v1 DataGrid control when other vendors have more mature products available.

I remember taking a look at the Xceed WPF DataGrid when it first appeared – back in early 2007. At the time I found the demo app to be quite off-putting. All orange glow and black gloss with ridiculously rounded corners.

However, whilst searching the internet for clues on using Microsoft’s WPF DataGrid I had stumbled across a number of posts/articles related to the Xceed grid. In fact many more so than any other WPF grid control. So from this I figured it must have an active community, which got me to thinking that maybe it was time to see how far the Xceed offering has come in the last two years?

Comparison against Microsoft’s WPF DataGrid

So how does the Xceed DataGrid stack up against Microsoft’s? Here are some of the benefits that I’ve found so far:

  • Binding to SelectedItem works just fine.
  • ReadOnly properties support at Grid, Column and Row level.
  • CheckBox column allows simple styling whilst preserving ReadOnly value.
  • Automatically supports current selection and edit indicators in the row header.
  • The grid theme matches the OS theme out of the box. This is how it should be. Sure the grid can be custom styled to suit but it only makes sense that by default the grid should match the look and feel of the standard themed controls.
  • When auto-generating column headers it correctly uses any System.ComponentModel.DisplayName attributes that have been applied to the underlying class.
  • There are lots of options at grid and column level that determine how a cell should enter edit mode. This is very useful for columns such as CheckBox columns where requiring a click to enter edit mode can be highly annoying (since the user would expect the click to toggle the checkbox).

In short – most of the stumbling blocks that I’ve hit getting the Microsoft WPF DataGrid to do something pretty trivial “just work” with the Xceed grid. That’s not to say there was no learning curve at all – I had to wrap my head around setting the ItemsSource to a DataGridCollectionView rather than direct to a ObservableCollection<T> to get anything to display for a start. But this was glaringly obvious as soon as I looked at any of the samples and “how to” guides. The supplied documentation is OK, but what impressed me most was the feedback provided on Xceeds community forums. Some really good answers provided by the Xceed team in an ultra timely fashion.

So what could be improved with Xceed’s DataGrid? Well, its a little early for me to provide a comprehensive list here – but off the cuff I’d make the following suggestions:

  • An easier mechanism for custom sorting. Rather than having to specific custom IComparer implemenations often it is easier to refer to an unbound property that contains the raw data. Like Microsoft’s SortMemberPath property. Hmm… I wonder if you could use a generic SortComparer to provide the same functionality?
  • Smaller assembly size. I know these days 2.08Mb shouldn’t be an issue but for my current contract it is. We have a ClickOnce application that is deployed to machines in remote country areas. Many of these machines are still using dial-up! Adding another another 2Mb to our current 4.5Mb total is a decision not to be made too lightly. [We’ve already been burned with a ridiculously bloated NHibernate assembly (1.6Mb)]

As much as I’ve had fun with the Microsoft DataGrid I’m now considering making the Xceed’s my DataGrid of choice – certainly for my own projects. Expect to see a few more posts on the Xceed DataGrid coming up soon.


Microsoft WPF DataGrid –

Xceed WPF DataGrid –

Hard Drive Performance

Today I spent an hour or so reconfiguring the hard disks in a few of my home machines. The idea was to boost the Windows Home Server machine  to 2Tb and also replace the aging 120Gb ATA drive in my main dev box (the oldest of four drives in that box and my last remaining ATA drive in service).

Once I was done swapping physical drives I wanted to check that the drive I was going to use to install the Windows 7 64bit RC build was sufficiently speedy. I decided to run a simple drive benchmark across my widely varying collection of disks. The results are as follows:

            120Gb                          200Gb                              400Gb                           640Gb                         1500Gb

HDD Benchmark 120Gb HDD Benchmark 200Gb HDD Benchmark 400Gb HDD Benchmark 640Gb HDD Benchmark 1500Gb

So the 120Gb drive that cost me AUD$413 in July 2002 has about one third the read speed of the latest 1.5Tb drive that cost me AUD$199.

From a cost perspective the 7 year old drive cost me $3.44 per gigabyte, compared to the new drive at just $0.13 per gigabyte. Still this pales in comparison to my first 20Mb hard drive that I bought 20 years ago for $950. That works out to $45000 per gigabyte!