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

RadDock loads non-existing controls

3 Answers 72 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Chris Vrolijk
Top achievements
Rank 1
Iron
Chris Vrolijk asked on 26 Oct 2015, 09:41 AM

We have a problem using the radDock.LoadFromXml() and radDock.SaveToXml() functionality. This is the case:

 1. We created an application some time ago, version 1.0. This application uses radDock.LoadFromXml() and radDock.SaveToXml() to save and restore the window settings.

2. We added new windows to this application in version 2.0.

3. People do use the original application (next to the new one) though, resulting in showing windows that do not exist in version 1.0 (!)

Is there a way to repair this? I know I can save and load the settings in a different file, but I am looking for a better solution (since we will have more new versions of our application).

 

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 27 Oct 2015, 11:10 AM
Hi Chris,

Thank you for writing.

RadDock does not have any built-in functionality for handling such scenarios. Using separate files for the different versions is actually a good solution because you will be able to determine for which version the loaded file is. For example, you can add the version to the filename which will allow you to distinguish the layout files.

I hope this helps. Should you have any other questions do not hesitate to ask.
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Chris Vrolijk
Top achievements
Rank 1
Iron
answered on 27 Oct 2015, 12:11 PM

Hi Dimitar,

 

Thanks for your quick response.

Regarding 3. in my first post:

- I conclude that the windows are created dynamically using the xml file, and no check is performed whether these windows actually exist in code. Can you confirm that?

- If so, is there a way to override the process of building the windows? That would enable me to add the check or other behavior myself.

We want to avoid remembering separate settings for the parallel versions. This is considered as annoying to our users. Instead, these must be shared by different versions of our application.

 Regards,

Chris

 

 

0
Dimitar
Telerik team
answered on 27 Oct 2015, 12:59 PM
Hi Chris,

Thank you for writing back.

Yes, you are correct, the windows are created according to the layout saved in the XML file. You can use the DockWindowAdded event to close some of the windows or perform another action:
void radDock1_DockWindowAdded(object sender, Telerik.WinControls.UI.Docking.DockWindowEventArgs e)
{
    if (e.DockWindow.Name == "toolWindow2")
    {
        e.DockWindow.Close();
    }
}

In addition, you can use SavedToXml and LoadedFromXml events as well.

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Dock
Asked by
Chris Vrolijk
Top achievements
Rank 1
Iron
Answers by
Dimitar
Telerik team
Chris Vrolijk
Top achievements
Rank 1
Iron
Share this question
or