2007-04-01

Heard this today: I have received Microsoft’s MVP award “Visual Developer — Visual C#” this year. Thanks to Microsoft, and also thanks to everybody who helped this along, you know who you are.

Now I just have to wait and see whether I’m still an MVP tomorrow, or rather an April’s fool… :-)


This struck me right after my recent post about binding to arbitrary sequences: my helper class was implemented with traditional .NET properties, which isn’t optimal for use with WPF. One thing specifically isn’t good for my purpose, which is the fact that a “normal” property can’t be the target of WPF data binding. Like in this case:

<Window.Resources>
  <engine:Grid x:Key="gameGrid" />
  <helpers:IntSequence x:Key="rowDummyList"
    EndVal="{Binding Source={StaticResource gameGrid}, P ...

Here’s something I just stumbled upon. Not quite intuitive, so I thought I’d write it down. Consider this piece of XAML (you can paste it into XamlPad to try it out):

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
  <DockPanel LastChildFill="False">
    <Button DockPanel.Dock="Bottom" Background="Yellow" Content="X" />
    <Button DockPanel.Dock="Bottom" Background="Red" Content="X" />
    <Button DockPanel.Dock="Bottom" Background="Blue" Content="X" />
    <Bu ...

In certain contexts I have always found it useful to bind to a sequence of numbers, or sometimes even just a dummy collection with a certain number of elements. It’s like a for-loop, just for data binding. I’ve found three good ways of doing that in XAML, as the following two source code snippets show:

<Window x:Class="WPFSequenceBinding.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:sys="clr- ...

I have this sample from a recent talk at Basta! conference in Germany, which shows (among other things) how to bind a cross table to a DataGridView (the standard .NET 2 data grid). A cross table is basically the result of transposing some data and using one of the fields for a second dimension.

The sample I have works on two tables of data. It doesn’t actually use a database and the reference that points from the list of votes to that of features is implemented as an object reference, but the …


2007-03-13

March 21st is the date of the MSDN Roadshow in London. Should be interesting to hear some news about LINQ, the Entity Framework, AJAX and XAML… I’ll be there, and hoping to meet a few of you! Registration is apparently still open, so follow this link if you haven’t signed up yet. After the event, there’s another fabulous geek dinner organized by the every more experienced geek-dinner-organizer Zi Makki :-) If you’re interested in meeting some of the other guys you read about in the blog-o-sph …


2007-03-10

After reading lots of stuff about ReadyBoost, hearing Dave’s song and having it recommended to me by a colleague, I decided to try it out on my system. Why hadn’t I done so before? Well… laziness ;-) And, seriously, I didn’t think I’d really like it too much. I’m using my main system (which is an Acer TravelMate 8204WLMi) on the road a lot, meaning elsewhere but standing on my desk. The most propagated option for ReadyBoost is to use a USB flash drive. Unlike (apparently) many people, I don’t …


2007-03-09

bb8800.png

I got myself a BlackBerry, which I’ve never had before. It came with a software CD, but although the model I got is rather new (BlackBerry 8800), the software was an older version and I was immediately suspicious of its compatibility with Vista. The first thing I noticed when I tried to install it nevertheless is that the installer is unbelievably slow — meaning it has long periods of doing nothing at all. Between the splash screen that comes up in the …