Hey, you snooped my app! uh…thanks!
In an interesting post about “thoughts on WPF 4 from a novice” which discusses the effort to build MetroTwit, there are a bunch of interesting comments.
My favorite is http://www.istartedsomething.com/20100711/thoughts-on-wpf-4-0-from-a-novice/#comment-128631 where Nelson digs in and gives some great perf tips to the MetroTwit team.
From just looking at MetroTwit in Snoop, it’s still much too heavy visually. You need to optimize your visual tree, and your framerate will go up as a result. For example, there’s no need to have a RichTextBox for *every* item in the List.
Use a DataTemplateSelector and only show the RichTextBox when the mouse is hovered over it. For everything else, use a TextBlock which still maintains the formatting.
There’s also a gratuitous use of Grids where StackPanels would use. Grids are heavier visually than StackPanels, and their Layout passes are much more complex.
Freeze resources, use BitmapCaching where applicable, etc.
WPF has many ways to do things, but generally only a few work really well. It’s inherent in the flexibility of the platform.
How can Microsoft, and other parts of the WPF/Silverlight ecosystem, make it easier to get this kind of feedback for your app?