Setting size of the RadPane

11 posts, 0 answers
  1. Ujjwal Lahoti
    Ujjwal Lahoti avatar
    67 posts
    Member since:
    Jan 2010

    Posted 21 Apr 2010 Link to this post

    Is there a way to set minimum/maximum width of RadPane. When I try to do that, that the RadPanes don't fill the complete space (see attached image). Also when I resize the window I want to be able to set RadPane's widths.

    Other solution I have seen is that set the Realtive size of the RadPanes in a RadPaneGroup. However I have some windows, I want them to be of FixWidth/FixHeight, and with Resizing, I don't want them to change.

    If you have an example, that illustrates different resizing options do let me know.
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 23 Apr 2010 Link to this post

    Hi Ujjwal,

     There are two types of sizing in the Docking control - relative and absolute. In the current version they cannot be used together. The absolute sizes are used for the size of the root-level SplitContainers and the relative are used for the items of the SplitContainers.

    Setting MinWidth and MinHeight, MaxWidth and MaxHeight should work fine, but you shouldn't set it on the panes, but on the groups and split containers. Unfortunately if you do this when the user drags a group this could be no longer valid.

    All the best,
    Miroslav Nedyalkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ujjwal Lahoti
    Ujjwal Lahoti avatar
    67 posts
    Member since:
    Jan 2010

    Posted 27 Apr 2010 Link to this post

    Thanks for the reply.

    Does this mean, to provide a width/Height to a RadPane, can I create a SplitContainer with only one item? Would this work?
  5. Ujjwal Lahoti
    Ujjwal Lahoti avatar
    67 posts
    Member since:
    Jan 2010

    Posted 27 Apr 2010 Link to this post

    Further to state my problem again, if I have a Split container, with Orientation Vertical, and there are 2 panes inside it. Can I specify Height for one of the panes, and let the other pane cover remainder of the space? If the user changes it later, it is acceptable to me.
  6. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 29 Apr 2010 Link to this post

    Hi Ujjwal,

     This is not supported yet. We had plans to add absolute sizing the SplitContainers, but we decided to postpone this feature for now.

    Setting Width and Height to the panes will not affect the space their content occupies. The Width and Height will take effect only for root-level split containers.

    If you describe us your scenario we might be able to help you find a solution how to organize your layout with the limitations of the Docking control. A screenshot will be very helpful for this.

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Davy Tavernier
    Davy Tavernier avatar
    4 posts
    Member since:
    Dec 2009

    Posted 10 Jun 2010 Link to this post

    I have a similar problem.

    My Docking control is defined like this:

     

    <radDock:RadDocking x:Name="radDocking1" HasDocumentHost="False">  
                <radDock:RadSplitContainer Orientation="Vertical" radDock:RadDocking.DockState="DockedTop">  
                    <radDock:RadPaneGroup Focusable="False" MinHeight="150" 
                                          radDock:ProportionalStackPanel.RelativeSize="100,100">  
                        <radDock:RadPane x:Name="rpCriteria" ContextMenuTemplate="{x:Null}" 
                                         Header="Zoekopdracht ingeven" 
                                         IsPinned="{Binding Path=ViewModel.ZoekenPinInfo, Mode=TwoWay}" 
                                         CanUserClose="False" CanFloat="False" 
                                         Content="{Binding Path=ViewModel.ZoekCriteria}">  
                        </radDock:RadPane> 
                    </radDock:RadPaneGroup> 
                    <radDock:RadPaneGroup Focusable="False" radDock:ProportionalStackPanel.RelativeSize="100,400">  
                        <radDock:RadPane x:Name="rpResultaat" ContextMenuTemplate="{x:Null}" 
                                         Title="{Binding Path=ViewModel.ZoekResultaatTitle}" 
                                         CanUserClose="False" CanFloat="False" CanUserPin="False" 
                                         Content="{Binding Path=ViewModel.ZoekResultaat}">  
                        </radDock:RadPane> 
                        <!--TitleTemplate="{StaticResource TitleTemplate}"--> 
                    </radDock:RadPaneGroup> 
                </radDock:RadSplitContainer> 
            </radDock:RadDocking> 

    I've also added a screenshot to this post of how the application looks with this docking control.

    Now, the user can resize the two radpanegroups with the splitcontainer, but when he leaves the tab with docking control and comes back to it, the two radpanegroups are in their original relative size again as defined in the xaml, which is of course logical. Now, the user needs to come back to this screen with the radpanegroups the same size as he left it.

    I tried this to remove the relative size and setting the Height property op the RadPanegroup (and bind it to my viewmodel), but then the radpanegroups are not nicely alligned with each-other anymore.

    Is there a way to accomplish this?

  8. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 14 Jun 2010 Link to this post

    Hello Davy,

     Changing tabs shouldn't reset the layout of the Docking control. Could you pleases send us a sample project that reproduces the problem? This would help us investigate what the problem is.

    Greetings,
    Miroslav Nedyalkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  9. Davy Tavernier
    Davy Tavernier avatar
    4 posts
    Member since:
    Dec 2009

    Posted 15 Jun 2010 Link to this post

    I already know why the application lost the layout of the docking control when tabbing. It's because the UserControl where docking control is on gets destroyed when tabbing. I need to bind the properties of my layout to the underlying viewmodel to keep the layout settings.
  10. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 17 Jun 2010 Link to this post

    Hello Davy,

     I'm happy that you found the source of the problem. If you have further questions, don't hesitate to contact us.

    Sincerely yours,
    Miroslav Nedyalkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Daniel B.
    Daniel B. avatar
    18 posts
    Member since:
    Apr 2015

    Posted 25 May 2015 in reply to Miroslav Nedyalkov Link to this post

    @Telerik - can you please confirm if this absolute sizing (or even just min-height restrictions) can be applied to mutiple RadPaneGroup children of RadSplitContainers yet?

    Your documentation doesnt make any mention of this, and adding height, minheight or maxheight breaks the alignment of panels, hiding the first behind the others (see second screenshot) 

    Here is my use case (code excerpt and screenshots)

     

    <!-- Left Docking -->
    <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft"
                               telerik:RadDocking.SerializationTag="DockedLeftSplit1"
                                    Width="200"
                               >
        <telerik:RadPaneGroup x:Name="LeftPanelGroup1"
                              telerik:RadDocking.SerializationTag="LeftPanelGroup1"
                               telerik:ProportionalStackPanel.RelativeSize="100, 17"
                              MaxHeight="30"
                              >
     
            <telerik:RadPane Header="Search" Tag="SearchPanel"
                             telerik:RadDocking.SerializationTag="SearchPanel"
                             Padding="0"
                             >
                <StackPanel Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Orientation="Horizontal" DataContext="{StaticResource ResourceKey=dongleViewModel}"
                              
                            >
     
                    <TextBox x:Name="mainSearchBox" Width="150" Margin="2"
                              Height="25"
                             ></TextBox>
                    <Button x:Name="BtnSearch" Margin="2" ToolTip="Universal Search" Style="{StaticResource IconButtonStyleA}"
                                Click="BtnSearch_OnClick">
                        <Image Source="..\Images\icons\icandies\16\find.png"/>
                    </Button>
                </StackPanel>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
        <telerik:RadPaneGroup x:Name="LeftPanelGroup2"
                              telerik:RadDocking.SerializationTag="LeftPanelGroup2"
                               telerik:ProportionalStackPanel.RelativeSize="100, 100"
                              >
            <telerik:RadPane Header="Recently Viewed" Tag="RecentlyItems"
                             telerik:RadDocking.SerializationTag="RecentItems"
                             Padding="0"
                             >
                <StackPanel>
                <telerik:RadListBox x:Name="radListBox" HorizontalAlignment="Stretch"
                ItemsSource="{Binding recentItems}"
                                    Style="{StaticResource CustomRadListBoxStyle}"
                                    ItemContainerStyle="{StaticResource CustomRadListBoxItemStyle}"
                                    MouseDoubleClick="RecentItems_DbClick">
                </telerik:RadListBox>
                </StackPanel>
     
            </telerik:RadPane>
     
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>

     

     

  12. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 28 May 2015 Link to this post

    Hi,

    In the current version of RadDocking setting the Width, MaxWidth, MinWidth or Height, MaxHeight, MinHeight to any of its elements (RadSplitContainer, RadPaneGroup or RadPane) is not supported by the control. We have a logged feature request in our feedback portal for providing such built-in feature in the control. You can vote for it and track its status here. You can try setting MaxHeight of the one of the outer controls (of the Docking for example) and set such a relative size of the first PaneGroup that would guarantee you a max height of 30 for it.

    Hope this helps.


    Regards,
    Kalin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready