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

howto define maximum size for a pane

5 Answers 157 Views
Docking
This is a migrated thread and some comments may be shown as answers.
HDC
Top achievements
Rank 1
HDC asked on 11 Oct 2012, 04:25 PM
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



5 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 16 Oct 2012, 02:51 PM
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.

0
HDC
Top achievements
Rank 1
answered on 19 Oct 2012, 02:24 PM
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
0
George
Telerik team
answered on 25 Oct 2012, 07:51 AM
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.

0
HDC
Top achievements
Rank 1
answered on 25 Oct 2012, 10:57 AM
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

0
George
Telerik team
answered on 30 Oct 2012, 02:24 PM
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.

Tags
Docking
Asked by
HDC
Top achievements
Rank 1
Answers by
George
Telerik team
HDC
Top achievements
Rank 1
Share this question
or