XAMLFest 2008
After all of the success of the first round of Boston XAMLFest (12/11 and 12/12), Microsoft decided to host a second set of days this week (12/15 and 12/16). XAMLFest was a quick but detailed look into WPF and SilverLight; with minimal marketing slides and a lot of hands-on coding and walk-throughs. The time was split up between Visual Studio development (John P) for the coding aspects and Expression Blend 2 (John B) for the UI.
While I have been doing a lot WPF work for a bit, this experience was awesome. I learned several tips and tricks that should help for my current and future projects. I also learned about some great tools that are must-haves for working with SilverLight or WPF.
One tool that is a must for understanding the details of what is happening within a running WPF application is Snoop. This tool allows you to see the entire inheritance tree of all visual elements, with "actual" properties, values, and indicators so you know if the values are default, set, or inherited.
I also learned a simple tip that helped solve a minor problem I was having. I created a fancy title bar to replace the default title bar. The problem was, one of my visual elements was over the buttons, causing only half of the button to respond to click events. While there were likely many other ways to fix the problem, one simple property setting took care of the problem. By setting IsHitTestVisible to False on the UI element, it no longer blocked the mouse down event from reaching the makeshift close and minimize buttons on my title bar.
Finally, there were a couple of differences between SilverLight and WPF that made a difference to me (though the full list is much bigger!)
- In SilverLight, you have a much more limited list of set Brushes to use when styling. This was to keep the download package smaller.
- The default binding mode for SilverLight elements is OneWayToSource, while in WPF it is "default" (which varies by object type).
- There is no native support for synchronized collection binding (IsSynchronizedWithCurrentItem or "/" notation to indicate "current item in collection". This makes it more difficult to do "master-detail" binding, where you have a list view that automagically updates a detailed view.
I'm playing around with some list templates that should allow for some cool visual effects for both viewing and editing data. I'll post them up when I get them done.
Joe