Aaron Brethorst

Round peg in a square hole, rabid generalist.

Rocking 3D Graphics With WPF

| Comments

Eric Sink, blogger extraordinaire and founder of SourceGear, experimented with Windows Presentation Foundation (formerly known as Avalon) last month, with great success. He built an application that enumerates woodworking steps along with little 3D previews, and had this to say about the experience: WPF 3D is far simpler to use than Managed DirectX. That’s kind of a remarkable thing to say when you consider that Managed DirectX is far simpler than using DirectX from unmanaged code. I was able to get excellent results from the 3D features of WPF in very little time.

A follow-up blog entry from Eric dicusses printing support in WPF:

Recently I switched everything over to WPF. Here is my printing code:
  PrintDialog dlg = new PrintDialog();
  if ((bool)dlg.ShowDialog().GetValueOrDefault())
  {

  dlg.PrintVisual(myViewport, "sawdust");

}

Five lines. Were it not for my pathological need to use braces on every if statement, it would be three lines.

I’ve seen some demos of WPF that really just knocked me onto my ass, and stories like Eric’s reconfirm my excitement in the framework, but I haven’t had the time or patience to really get in and learn WPF, yet. In the parlance of the Developer Division’s Usability group, I’m probably an Elvis, compared to Eric Sink’s Einstein, and I generally lack the patience to dig into new frameworks and technologies until the tooling catches up.

That said, I still write HTML and CSS by hand, so maybe I’m just being lazy :-).

Comments