Docking within tabs

3 posts, 1 answers
  1. Paul
    Paul avatar
    42 posts
    Member since:
    Jan 2012

    Posted 23 Jan 2012 Link to this post

    I have created a UserControl which consists of the RadDocking control.  Within this I place the RadPaneGroups and subsequent RadPanes.  Each RadPane contains a View, to which a ViewModel is created.  The problem occurs when I place the upper most UserControl, with the RadDocking, in a tab.  The tabs are dynamically created very similar to your expample with RadTab.  Each time I switch tabs I see the Views being reinstantiated and in turn the ViewModel and Model.  When I remove the upper most UserControl, with the RadDocking control, this does not occur.  What is best practice of placing the RadDocking control within tabs without encountering this behavior?

    Thank you
  2. Answer
    Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 24 Jan 2012 Link to this post

    Hi,

    Setting the IsContentPreserved property of the RadTabControl to true should prevent the RadDocking control from reloading. If this doesn't help, could you please prepare us a sample project that demonstrates the issue? This would help us to better understand what the problem is.

    Regards,
    Miroslav Nedyalkov
    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. Paul
    Paul avatar
    42 posts
    Member since:
    Jan 2012

    Posted 24 Jan 2012 Link to this post

    I replaced the WFP TabControl with RadTabControl and set the IsContentPreserved property as you advised.  This did solve my problem.

    Thank you.
Back to Top