September 2007 Blog Posts

WPF Image Viewer Part 6, Binding to Current List Item

This is a part of the WPF image viewer tutorial: Introduction, Part 1, Part2, Part 3, Part 4 and Part 5. In this post were going to replace the big blue area in the center of our window with an image, obviously the image we want is the selected thumbnail from the list box to the left. First let's replace the blue rectangle with an image control, then we'll figure out how to get the image into it, just replace the second rectangle in the XAML file with an <Image/> element. Now let's play with data binding, WPF has very nice support for binding...

WPF Image Viewer Part 5, Panels

This is a part of the WPF image viewer tutorial: Introduction, Part 1, Part2, Part 3 and Part 4. In this part where going to organize our application layout, currently our entire application window just contains a list box full of images, it was easier to do then with WinForms but that doesn't make it very useful. The WPF controls that can contain multiple children and arrange them are called panels, WPF has several useful panels we can use, in this post we'll use the StackPanel and DockPanel panels. StackPanel The StackPanel is probably the simplest panel in WPF, it just arranges all its children...

Binding to the Current Item in WPF

Here's something really cool you can do with WPF data binding – bind to the current item in a collection.