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

reset to standard layout

5 Answers 395 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Franziska
Top achievements
Rank 1
Franziska asked on 27 Oct 2011, 08:52 AM
Hi!

I am trying to offer a menu item to reset the layout to the standard layout.

I am aware of the save/load layout methods, but I want to save my self from implementing this, since the standard layout is defined in the XAML anyway.

Is there a built-in command to which I can bind?
If not, what do I have to implement in my menu item click event? Is there something like a pane reload method somewhere?

Thanks,
Franziska

5 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 27 Oct 2011, 02:52 PM
Hi Franziska,

There is no build in command you can use. However, you can implement it using the Save/Load layout functionality. You could save the initial position of the panes and on the menu item click to load it manually.

Hope this information helps.

Best wishes,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Franziska
Top achievements
Rank 1
answered on 07 Nov 2011, 03:44 PM
Dear Konstantina,

If have implemented my restore function with the save/load functionality.
The layout is reset perfectly, but there is a problem with the RadPane Headers, they are not reloaded.
I can see, that they get saved in the XML stream, but not reloaded.

Some of my Headers have a constant value, others get their Header set via Bindings. Only those with a constant value get saved in the XML stream.

Best regards,

Franziska
0
Konstantina
Telerik team
answered on 08 Nov 2011, 01:22 PM
Hi Franziska,

The DataContext is not inherited from the Pane. So, to make it work, please set the DataContext of the Pane to be the same as the Docking control, i.e. set the ElementName of the binding to the Docking control's name.

Hope this helps.

Best wishes,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Franziska
Top achievements
Rank 1
answered on 08 Nov 2011, 03:06 PM
Dear Konstantina,

Also those Headers set to a constant value are not restored, even though they are saved into the XML.

Do you mean I shall set the DataContext of the Docking explicitly to the DataContext of the Window which contains the docking? Because this also does not work.

Best regards,

Franziska

0
Konstantina
Telerik team
answered on 11 Nov 2011, 10:41 AM
Hi Franziska,

I meant that you have to set the binding of the Pane, for example like so:

<telerik:RadPaneGroup>
                   <telerik:RadPane telerik:RadDocking.SerializationTag="paneTwo" DataContext="{Binding ElementName=docking, Path=DataContext}" Header="{Binding MyProperty, Mode=TwoWay}" />
               </telerik:RadPaneGroup>

If that doesn't work could you please send us some code snippets, or ideally a sample project, which we can run here locally and review?

Regards,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Docking
Asked by
Franziska
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Franziska
Top achievements
Rank 1
Share this question
or