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

RadDock Save Layout To App Settings

3 Answers 135 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Garry
Top achievements
Rank 1
Garry asked on 10 May 2010, 02:01 PM
I know I can persist the RadDock layout to a file, but can I persist the layout to an application setting property? If so any example?

Thanks!

3 Answers, 1 is accepted

Sort by
0
Mikhailo Shuturma
Top achievements
Rank 1
answered on 11 May 2010, 10:10 AM
Idea:
You can to create a file with XML data (save layout to string), and then in app settings you can crate string key with saved XML value. But when you do modification of this layout (remove/add panes, etc. in XAML) needs to replace value in app settings.
0
Garry
Top achievements
Rank 1
answered on 11 May 2010, 02:12 PM
Mikhailo,
Thank you for the response, but I am not sure how your idea would work. Also the problem is that this is a Prism MVVM app so people can add modules, which are for the most part contained in RadPanes not UserControls so there could potentially be a lot of new Panes added.

However I will take your idea and see if I can make it work somehow. Thank you again for your response.

I would really like Telerik to come up with a method of persisting the layout data in the app.settings. Only makes sense to me.
0
Miroslav Nedyalkov
Telerik team
answered on 13 May 2010, 11:34 AM
Hello Everybody,

 The docking control API lets you persist the layout into a stream. This stream could be a memory stream in particular and you create a string from it and write it to your application settings. After that you could persist the settings. For more information about how to write the layout to a string you could refer to the online demos: http://demos.telerik.com/WPF/?Docking/SaveLoadLayout. For more information on how to persist you application settings you could refer to the following article: http://msdn.microsoft.com/en-us/library/ms973902.aspx.

Best wishes,
Miroslav Nedyalkov
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
Docking
Asked by
Garry
Top achievements
Rank 1
Answers by
Mikhailo Shuturma
Top achievements
Rank 1
Garry
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Share this question
or