Grant Hinkson Blog

Silverlight, WPF, Fireworks, Flash, XAML, .NET, User Experience, Graphic Design, Web Programming and more!

Archive for the ‘WPF’ Category

Sunday
Oct 26,2008

UPDATE: Click Here for the Latest Version
If you’re using Fireworks CS4 and the Fireworks to XAML Exporter, chances are you’ve seen a problem with the quotation marks in the rendered XAML. I first saw this several months ago, but assumed it was just an issue with a beta version of Blend I was using at the time. As it turns out, changes to the core Fireworks text rendering engine were actually causing the problem – a result of the way I was copying text to the clipboard.

The original version of the panel creates a Fireworks text block, pastes the generated XAML inside the text block, then does a clipCut() to remove the text block from the stage and copy it to the clipboard. The latest version (posted here), sends the XAML back to the Flash panel and, using the System.setClipboard() method, pastes the XAML to the clipboard. The result is a noticeably faster export operation, a very nice surprise.

I’ve also done a little additional housecleaning, adding support for the new pixel-based rounded corners feature of Fireworks CS4. This is actually one of my favorite new features — where previously the CornerRadius of rectangles in Fireworks was percentage-based (meaning the amount of roundness would change as you resized the rectangle) you can now specify a pixel-based CornerRadius. This approach ensures the same CornerRadius regardless of the size of the rectangle. (This is how both WPF and Silverlight do it also). The updated panel will honor both percentage and pixel-based roundness modes.

I also updated the way text is converted to paths. Now, instead of a group of individual path objects (the result you get when you select Text > Convert to Paths in Fireworks, I go two steps further, first ungrouping the indivual paths, then joining them into a single path. The result is a much cleaner single Path object.

One last fix I made over the weekend addresses a problem exposed by Silverlight. The FW to XAML panel automatically adds a .Resources collection to the outermost panel, should any of its children need to define a brush resource. Often, this Resources collection was rendered as an empty node <Grid.Resources />, something that the Silverlight engine does not like (WPF just ignores it). So, this latest update removes the Resources node if it’s empty. You’re welcome!

Summary of Changes

  • New Clipboard Logic – supports Fireworks CS4, improved performance
  • Support for both percentage and pixel-based rectangle roundness modes (pixel-based mode introduced with FW CS4)
  • Text to Paths operation results in fewer XAML objects
  • No longer render empty Resources collection (exposed via Silverlight)
Additional Notes
As always, you’re guinea pigs. Please let me know if you run into any problems with this update. I have run it through my standard gauntlet of tests, but I may have missed a use case.

DevScovery Redmond Session Files

Sunday
Sep 7,2008

A couple of weeks ago I presented two sessions at DevScoveryBlend for Developers, and Meeting in the Middle, designer/developer workflow (co-presented with Josh Smith). I’ve posted zip files for both presentations. The zip for the Blend session includes just the presentation itself, which may or may not be helpful. It basically defines a rough outline for the presentation. I’ve given that presentation a few times now, and each time it’s a little bit different, depending on the audience. I try to keep the session as interactive as possible, focusing on areas of the tool that are of interest to the current audience. I actually ended up spending a considerable amount of time discussing the different panels available in WPF, a little low-level for a Blend presentation, but necessary if you don’t have that fundamental knowledge of WPF layout.

Download DevScovery: Introduction to Blend Presentation

The Meeting in the Middle zip file includes the presentation, a demo project, and a Fireworks source file used for layout. This is the third time I’ve done this presentation and the second time I’ve done it with Josh. This time, we worked through the slides, covering core concepts in WPF that enable an effective designer/developer workflow and concluded the presentation by creating a simple XML-bound layout. Josh created the rough, developer-styled layout in Visual Studio, then I stepped in and imported artwork from Fireworks and tweaked the layout in Blend. We made it through without any problems – a miracle considering how many moving pieces there were. We kept the scope of the application extremely small though, so that worked in our favor.

Download DevScovery: Meeting in the Middle Presentation

NetAdvantage for WPF 2008.2 Public CTP

Wednesday
Aug 13,2008

If you don’t know about it yet, Infragistics posted a Public CTP of NetAdvantage for WPF 2008.2, which includes the new xamOutlookBar and Reporting features. From the post…

In an effort to get more code to the public faster, Infragistics’ WPF team has shipped an interim build of NetAdvantage for WPF controls planned for the 2008 Volume 2 release. This release includes two major enhancements: xamOutlookBar and Printing Capabilities that not only easily print the xamDataGrid, but allow for the creation of a fully stylized report. The xamOutlookBar is styled and has functionally modeled off of Outlook 2007 which greatly increases the developers ability to create line of business applications. The Printing Capabilities allow not only printing, but allow for publishing documents out as XPS.

Infragistics Silverlight CTP Posted

Monday
Jun 9,2008

The Infragistics Silverlight June CTP is now available for demo and download, compiled against Silverlight 2 Beta 2 released last Friday.

The CTP includes a Silverlight Chart and Silverlight Gauge both of which you can see in the online demo. So download the bits, take them for a test drive, then send us feedback and help shape the final shipping product!

Podder Skinning Competition

Sunday
Apr 27,2008

Calling all WPF Designers/Developers — Josh just announced the Podder Skinning Competition.

For those of you who’ve been thinking about creating your own custom skin, now you finally have some incentive to do it! Josh and I put in a lot of late nights to release Podder v2 in time for Mix ’08. That was almost two months ago, so I’m sure you’ve already had ideas for new skins that you just haven’t made time for. Well, you have until July to realize your vision – so get to it and impress us all!

Meta


Recent Comments