Archive for September, 2009

WPF Tips and Tricks Part 1

So I was at the local Atlanta Silverlight Meetup last night and we got on the topic what you get and dont get from most training programs for WPF and Silverlight.  While there are some out there that are very good about providing the full in-depth knowledge of WPF programming there are sometimes items that are very important to know but get left out.  I refer to these as Tips and Tricks.  I talked about some of them and found out most of them had not run into these scenario’s and understanding of what WPF does.  I have found some of these out on the web already but I wanted to do a blog series of the Tips and Tricks I find to be very good to understand.

The first tip I end up giving when talking to people who are new to WPF is about a situation with Converters.  I find that when Converters are first seen they are loved and then used everywhere.  Well a Converter is not as performant as a Trigger.  A lot of the time I see converters created that could very easilly be represented as a trigger and by swapping out all of the converters with the triggers we saw a good performance increase.  So my first tip is “Try to not use converters if you dont have to, see if you can find a way to use a trigger to achieve the same result”.

Part 2 coming soon!

No Comments

Razre WPF Framework

Hello Everyone!

Wanted to give an update on a framework I am working on called Razre.  This framework utilizes some pieces of Prism2 and provides a few more functional framework pieces.  Currently the features I have working are Primary Navigation with customizable transition animation, An implementation of the MVVM UI design pattern that utilizes DataTemplates to resolve a View to a ViewModel and a full DataTemplate to ViewModel Themeing mechanism.

The different pieces are tied into each other to provide a rich and performant base system from which to develop upon.  The NavigationManager allows to define primary screen navigation by navigating to custom visuals or directly to an instance of a ViewModel.  The MVVM system utilizes a ViewModelFactory to create and resolve the appropriate View through a DataTemplate without relying on a DynamicResource.  The themeing mechanism understands how to notify a ViewModel when its theme has changed so that the ViewModel can find a new DataTemplate pointing to a completely different View giving us full visual theming support.

I have the project up on CodePlex at http://razre.codeplex.com/ but i have not published the project yet.  My sample application needs alot of work and i still need to do more exection handling and commenting increasing the robustness of the framework.

Look to see it coming soon!

No Comments