Accessing second SplitContainer

2 posts, 0 answers
  1. Achim
    Achim avatar
    9 posts
    Member since:
    Aug 2013

    Posted 21 Aug 2013 Link to this post

    Hello there,

    is it possible to access a second SplitContainer in MVVM pattern in the ViewModel which is not the DocumentHost and add new Panes to it ? I have 2 Panes to search for Documents in a SplitContainer and want to re-add them to it in case that they have been closed by the user. The first SplitContainer contains the searchresults, which are editable, this is why that one is the DocumentHost. I can access the RadDocking in the ViewModel, which is passed to it as a CommandParameter. Thank you for your help!

    Regards,
    Achim
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 26 Aug 2013 Link to this post

    Hello,

    I am not sure I understand the exact scenario in your project. But you could access the SplitContainers that are declared in the Docking control with the use of the ChildrenOfType<RadSplitContainer>() method. The next code snippet shows how to add a Pane to the first SplitContainer of the Docking control with the previously mentioned approach:
    RadPane radPane = new RadPane() { Title = "New sample RadPane" };
    radPane.Content = new TextBox() { Text = "TextBox" };
    var splitContainers = this.Docking.ChildrenOfType<RadSplitContainer>().ToList<RadSplitContainer>();
    var paneGroup = splitContainers[0].Items[0] as RadPaneGroup;
    paneGroup.Items.Add(radPane);

    Hope this is helpful. If I have missed something could you try to reproduce the issue in a sample project and send it to us in a support ticket in order for us to observe the exact scenario on your project.

    Regards,
    Vladi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top