reset to standard layout

6 posts, 0 answers
  1. Franziska
    Franziska avatar
    29 posts
    Member since:
    Dec 2009

    Posted 27 Oct 2011 Link to this post

    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
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 27 Oct 2011 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Franziska
    Franziska avatar
    29 posts
    Member since:
    Dec 2009

    Posted 07 Nov 2011 Link to this post

    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
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 08 Nov 2011 Link to this post

    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 >>
  6. Franziska
    Franziska avatar
    29 posts
    Member since:
    Dec 2009

    Posted 08 Nov 2011 Link to this post

    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

  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 11 Nov 2011 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready