Visual Studio 2008 RTM this month (November)

November 6, 2007

In case missed the news today, it is according to Microsoft that Visual Studio 2008 and Microsoft .Net Framework 3.5 will be released this month. The link to this news is here.

This is a major step forward for the WPF/XAML developers because the inclusion of “Cider” — The much improved visual layout and designer support inside Visual Studio. Hope the release of VS 2008 will drive the adoption rate of WPF and XAML-based markup systems higher.

I will report more on new and improved features in WPF 3.5 once I can get a final release copy of VS 2008 and .Net Framework 3.5.

Stay tuned.

Nibbles Blend/WPF/XAML Tutorial site

October 29, 2007

For those of you who are still new to the world of Blend/WPF/XAML, here is a nice collection of tutorials on the Nibble’s site:

As for the lack of recent updates on this blog, I’ve been busy working on some internal middle-ware framework that are no-less amazing than WPF. It is good to see the WPF and especially XAML is attracting more attentions from the development community, even the Java/Eclipse community. Take a look at the eFace XAML engine for Java/Eclipse, you will see that the mark-up and declarative programming methodology is making ways into more traditional development worlds.

This is also happening to the middle-ware applets I am working on now. From Spring.Net, Castle/Windsor, we see more development approaches that adopt the MVC pattern and declarative ways of doing and implementing things. WPF is no exception here.

I will update more when I have more inspirations to share, not only limited to WPF or XAML anymore 🙂

Visual Brush in XAML

August 30, 2007

Visual brush in XAML is really easy and yet extremely powerful to use. Here I’ve included a list of examples I’ve gathered over the past few days. You may find them interesting 🙂

Another chart in WPF

August 21, 2007

A few weeks back I posted a WPF-based chart in my blog. Currently in one of my projects I need to deploy charts that support displaying multiple data series side-by-side and showing the value tick on the top similar as Google Finance charts does. So based on my previous WPF chart, I developed this “another chart” that can support multiple series. Here I also used the performance optimization with streamGeometry to enhance the chart memory consumption and response speed. I have to admit this chart is heavily inspired by the features in the Google Finance charts.

You can take a look at the final chart in action:

[Updated 8/4/2008]

The download link has been updated. CLick the following link to download the source code:

Mini Task Pane in WPF

August 20, 2007

I was searching for a sample task pane implementation in WPF that I can use in one of my applications. What I was looking for is something that works similar as the mini task pane that exists in Windows XP Explorer.Originally I thought templating the Expander should be easy. But after couple of trials, I gave up and instead went the route to build my own composite User Control to completely customize the look and feel I need. It turned out building such task pane in XAML is fairly straightforward and not difficult at all. This again proves the “Power of Composition” in the design philosophy in WPF. The animation and the effects are pretty standard: ScaleTransform animation for the bottom panel and the RotateTransform animation on the header image icon when the expander is clicked. I really like WPF more and more comparing to the old days when I was working with Win Forms. This will be a non-trivial task if implemented in Windows Forms.

Here is the results of the mini task pane I’ve built.

You can get the source code of the demo project here.

[Updated: 1/16/2009]

New source code link updated here

Formatted Text in WPF

August 19, 2007

WPF has very rich support for displaying and manipulating formatted text. I’ve recently came across couple articles at MSDN on this topic. You can get an overview of the rich format support from this article. And then you can read the in-depth article on drawing formatted text.

This compares very nicely with this excellent book on .Net 2.0 Windows Form GDI+ graphics and text drawing by Eric White. Overall I am very impressed with the rich format text rendering support in WPF, despite some unresolved anti-alias issues I have on Windows XP workstations.

A Data-Bound progress bar in WPF

August 15, 2007

Several weeks ago I posted a sample progress bar using rectangle overlay to achieve gradient looking and text overlay. But that control was C# code-driven to update the UI. Here I’ve improved it to utilize ValueConverters and Data Binding, so you can update its source data and the UI can automatically updates.

The XAML part of the ProgressBar control is listed as following. I am using two-column grid to simulate the progress bar container:

Then you can define your custom ValueConverter to convert percentage progress values to grid column widths. The following shows the ValueConverter for the ProgressBar Column Width property inside the parent grid:

You can create other types of ValueConverter to suit your needs.

Once you are done , then in your code you can easily adjust your progress data without manually coding against the Progress Bar UI anymore:

This has advantages in situations where you need to implement data-driven applications without in-depth knowledge of the visualization layer.

The finished UI will look like this:

[Update 8/27/2007]

After some study of the ControlTemplate in WPF, especially those special meaning PART elements in a control template, I realized this could be implemented with a ControlTemplate with all XAML approach. 

The key to the control template is to use the PART_Track and PART_Indicator element to contain the rectangle areas.

[Update: 1/16/2009]

Sample code (all XAML) posted here