howto define maximum size for a pane

6 posts, 0 answers
  1. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 11 Oct 2012 Link to this post

    Hi,

    I have following docking defined:

    <telerikDocking:RadSplitContainer Orientation="Horizontal" Grid.Row="1">     
      <telerikDocking:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="300, 30"                                                         x:Name="TaskRadPaneGroup">
         
        <telerikDocking:RadPane x:Name="Slide"
                                            Header=""               
                                PaneHeaderVisibility="Collapsed"    
                                CanUserClose="False">
           
          <Grid x:Name="SlideGrid" >
                 
          </Grid>
        </telerikDocking:RadPane>
       
      </telerikDocking:RadPaneGroup>
     
      <telerikDocking:RadSplitContainer Orientation="Vertical" >
        <telerikDocking:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="300, 30">
          <telerikDocking:RadPane x:Name="Properties"
                                  Header=""               
                                  PaneHeaderVisibility="Collapsed"    
                                  CanUserClose="False"                                 
                                  >
           
          </telerikDocking:RadPane>
        </telerikDocking:RadPaneGroup>
         
      </telerikDocking:RadSplitContainer>   
    </telerikDocking:RadSplitContainer>


    I want to prevent that a user can make the "Properties" pane wider then 10% of the total available surface so that there is always a reasonable width left for the other pane "Slide".

    I have used various combinations of MaxWidth on the different objects of docking, but nothing works. I want to make sure the user can not continue dragging the "Properties" pane using the mouse, so that the "Slide" pane becomes too small to be of use. I can limit the size of the properties grid realy easy, but the user can still continue make the pane as big as he wants.

    What is the correct way to handle this?

    Best Regards,

    Peter



  2. George
    Admin
    George avatar
    1332 posts

    Posted 16 Oct 2012 Link to this post

    Hi Peter,

     
    The RadDocking control is not designed to restrict resize, but you could accomplish this by removing or disabling the Resizer controls for the SplitContainer and PaneGroup templates. Another approach is to set IsHitTestVisible to false. Please, refer to the following code snippet:

    <telerik:RadDocking>
        <telerik:RadDocking.Resources>
            <Style TargetType="telerik:RadGridResizer">
                <Setter Property="IsHitTestVisible" Value="False" />
            </Style>
        </telerik:RadDocking.Resources>
    .....


    Hope this helps.

    Greetings,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 19 Oct 2012 Link to this post

    Hi George,

    This is only a solution for one of our panes, and i don't particularly like it as a workarround.

    Why do you have a "MaxWidth" property on a pane, if you do not honour it???

    What does this property do?

    I think it is a reasonable request to be able to limit the width of a pane within the docking framework.

    Best Regards,

    Peter
  5. George
    Admin
    George avatar
    1332 posts

    Posted 25 Oct 2012 Link to this post

    Hello Peter,

    The MaxWidth is a property of the FrameworkElement class and it truly gets or sets the maximum width constraint of the element in pixels, but the RadPane as a visual structure of the RadDocking control represents only the small tab in the pane groups. Setting it won't help because you need to restrict the size of the content of the pane, not the pane itself. For more information about the RadDocking visual structure, please refer to the following help article - http://www.telerik.com/help/silverlight/raddocking-visual-structure.html

    We will consider your request as a feature in the RadDocking control, but we need some more help about this scenario:
    • Do you want to restrict the content of only 1 pane? If yes, what do you expect to happen when this pane goes hidden or not selected in the RadPaneGroup? Also, if this pane goes floating, should it keep the same restrict size or not?
    • Do you want to restrict the content of the RadPaneGroup? This will restrict the content of all panes placed in this group, but what do you expect to happen when all panes from this group goes hidden or floating?


    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 25 Oct 2012 Link to this post

    Hi George,

    Thank you for considering it, here are my answers:

    After some thinking... it would only make sence to make it on groups... otherwise you could have groups with panes width different maxwidths... i don't think that could work.

    If the pane goes floating, maxwidth and/or maxheight should not be respected as maximums. The developer could make sure a pane cannot be made floating when it's not to become bigger then a certain size.

    The idea is that some content may simply not make sence to make it wider... it becomes plain ugly... example "Outlookbar" but also "Propertygrid" becomes really ugly when it's to big. Also sometimes, you just want to leave some viewing space in between panes.

    If a pane goes hidden then the maxwidth must still be maintained since it will only be on the group.

    Best Regards,

    Peter

  7. George
    Admin
    George avatar
    1332 posts

    Posted 30 Oct 2012 Link to this post

    Hello Peter,

    Thank you for your feedback, it helps us in improving our products. 

    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner