Tales from the Smart Client

John Gossman's observations on Avalon development

Avalon Performance: What is your Visual count?

The Avalon compositional UI model encourages you to create Styles and Templates (VisualTree in the May CTP build) that automatically generate visuals.  Build a complex Visual Tree and create a bunch of these automatically with data bound ListBoxes, and you can get into perf trouble.  Your XAML may be short and only show a couple of Grids and a ListBox, but the Visual count is through the roof.  That's what the TreeStatistics class in the last post is for.  Point it at the root of your tree and see how many Visuals you really have...that may explain why layout and rendering is taking so long...
Published Thursday, August 04, 2005 9:28 PM by JohnGossman

Comments

 

Life, Universe and Everything according to Dirk said:


Putting Constants in your XAML File? x:Static Is Your Friend.
Building an Avalon application: Part...
August 22, 2005 6:30 AM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker