This is a migrated thread and some comments may be shown as answers.

Paint issue when serealizing from XML

1 Answer 56 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Barry Harkness
Top achievements
Rank 1
Barry Harkness asked on 14 Oct 2009, 02:52 PM
When loading the RadDock from a previously saved XML file, there is a noticeable paint issue. The first thing drawn on screen is one of the docked windows, then about a second or two after that, the rest of the dock loads. Simply turning off the loading from XML fixes the issue. I thought it might be a problem with the RadDock's active window being incorrectly set, but after reading this post (http://www.telerik.com/community/forums/winforms/dock/autohide-doesn-t-seem-to-work-for-right-docked-toolwindows.aspx) and explicitly setting the active window, I don't think active window is the issue because the paint problem persists.

Thoughts?

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 16 Oct 2009, 02:41 PM
Hi Barry,

Thank you for contacting us.

Most probably this is due to the fact the LoadFromXML method is trying to activate an Auto-hidden window, which on its hand will be animated and thus will block the UI thread for a second.

You may try the following approach:

private void LoadRadDock()
{
    //begin a transaction block
    this.radDock1.BeginTransactionBlock(false);
    this.radDock1.LoadFromXml(@"my\file\path\state.xml");
    //activate a window, that is not auto-hidden
    this.radDock1.ActiveWindow = this.toolWindow1;
    this.radDock1.EndTransactionBlock();
}

Please, let me know whether this is of help.

Best wishes,
Georgi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Dock
Asked by
Barry Harkness
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or