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

Auto size RadSplitContainer

7 Answers 460 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Geoff Smith
Top achievements
Rank 1
Geoff Smith asked on 16 Nov 2010, 10:09 AM
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!

7 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 18 Nov 2010, 02:42 PM
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
0
Kais
Top achievements
Rank 1
answered on 09 Mar 2011, 09:46 PM
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);


0
Kais
Top achievements
Rank 1
answered on 09 Mar 2011, 09:56 PM
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!
0
Tobias
Top achievements
Rank 1
answered on 22 Sep 2011, 01:02 PM
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?
0
George
Telerik team
answered on 28 Sep 2011, 11:02 AM
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 >>

0
Mayra
Top achievements
Rank 1
answered on 22 Oct 2011, 07:02 AM
Is there a way to maintain current size from panned pane to floating pane?

Regards,
0
George
Telerik team
answered on 25 Oct 2011, 07:54 AM
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 >>

Tags
Docking
Asked by
Geoff Smith
Top achievements
Rank 1
Answers by
George
Telerik team
Kais
Top achievements
Rank 1
Tobias
Top achievements
Rank 1
Mayra
Top achievements
Rank 1
Share this question
or