We already answered to this question in StackOverflow. I'm posting the answer here too:
Basically you have two options for such issues:
- Add Style for the Shapes that sets default Width and Height of the Shapes. If this does not fill well in your scenario:
- Try invoking the Layout in Dispatcher.BeginInvoke
Dispatcher.BeginInvoke(() => this.treeLayout.Layout(...)
In addition, I want to mention that we are currently working on improving the Layout mechanism. Our goal is to provide a LayoutAsync()
public method that will ensure internally that the shapes are measured and this way the layout will be successful. This will eliminate the current need of workarounds mentioned above.
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>