Auto size RadSplitContainer

8 posts, 0 answers
  1. Geoff Smith
    Geoff Smith avatar
    48 posts
    Member since:
    Mar 2010

    Posted 16 Nov 2010 Link to this post

    Hi,

    Is it possible to have a RadPane automatically fit to the size of the control its in? I'm guessing this would need to be done at the RadSplitContainer level. Any suggestions?

    Thanks!
  2. George
    Admin
    George avatar
    1332 posts

    Posted 18 Nov 2010 Link to this post

    Hello Geoff,

    RadPane represents only the small tabs in the RadDocking control. For reference, please see our online documentation - http://www.telerik.com/help/wpf/raddocking-visual-structure.html. Could you please give us more information about your scenario? It would be very helpful. 

    Greetings,
    George
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. UI for WPF is Visual Studio 2017 Ready
  4. Kais
    Kais avatar
    18 posts
    Member since:
    Jan 2011

    Posted 09 Mar 2011 Link to this post

    Hi there, 

    I just stumbled across this post when searching for "Size" in WPF Docking. What I am trying to achieve is a component-oriented GUI with RadDocking at the heart. The user can start a number of components in the app, each of which is basically a Usercontrol/Viewmodel pair with some dependencies. 

    What I would like (not sure if it is similar to the original poster, but may be) is when I programmatically dock a component (I am just going for top, left, right, bottom or float, nothing fancy) that the docked pane is the correct size to fit the usercontrol it hosts. For instance, I have one control that is just a search text box with autocomplete. That needs to be around 80 pixels high but the width can stretch to fit. 

    Is it possible to do anything like this?

    Failing that, when I programmatically dock, how can I specifically set the size? I could at least put an attribute on my component views to specify their desired initial docking size. 

    The code I am using to programmitcally dock is:

    // Create a split container and group and dock the pane at the specified position
    // Note pane has already been created and hosts the component view/viewmodel
    RadSplitContainer splitContainer = new RadSplitContainer { InitialPosition = dockState };
    RadPaneGroup group = new RadPaneGroup();
    splitContainer.Items.Add(group);
    _dockManager.Items.Add(splitContainer);
    group.AddItem(pane, dockPosition);


  5. Kais
    Kais avatar
    18 posts
    Member since:
    Jan 2011

    Posted 09 Mar 2011 Link to this post

    Ah, my question has been answered. I opened up a support ticket and started typing and this hyper-clever auto-suggestion engine pointed me to here:

    http://www.telerik.com/help/wpf/raddocking-features-split-container.html#Setting_the_Initial_FloatingSize_of_the_RadSplitContainer

    Brilliant!
  6. Tobias
    Tobias avatar
    8 posts
    Member since:
    Aug 2011

    Posted 22 Sep 2011 Link to this post

    In the link posted by Kais there is an example on how to set a fixed initial size for all panes in the RadSplitContainer.

    But I would like each pane docked in the RadSplitContainer to autosize to it's own content. For example, we have a TreeView in a docked RadPane and when expanding nodes in the tree that have wide items we want the pane to increase the width automatically.

    How can I accomplish this?
  7. George
    Admin
    George avatar
    1332 posts

    Posted 28 Sep 2011 Link to this post

    Hello Tobias,

    This feature is not possible with the current version of RadDocking control. I would suggest using a ScrollViewer and place the TreeView inside of it. This will enable the scrollbar and it won't clip the TreeView items.

    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Mayra
    Mayra avatar
    18 posts
    Member since:
    Oct 2011

    Posted 22 Oct 2011 Link to this post

    Is there a way to maintain current size from panned pane to floating pane?

    Regards,
  9. George
    Admin
    George avatar
    1332 posts

    Posted 25 Oct 2011 Link to this post

    Hi Mayra,


    Currently this feature is missing for the RadDocking control, but you could manually  control the size of a floating pane using the RadDocking.FloatingSize attached property. Please, refer to the following link for additional information - http://www.telerik.com/help/silverlight/raddocking-features-panes-docked-floating-panes.html.

    Hope this helps.


    Best wishes,
    George
    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