Freeze layout to prevent resizing

2 posts, 0 answers
  1. Pete
    Pete avatar
    67 posts
    Member since:
    Sep 2012

    Posted 15 Aug 2011 Link to this post

    The following article describes how freeze docked panels
    http://www.telerik.com/help/silverlight/raddocking-how-to-freeze-the-layout.html

    "Disable Resizing of the Panes

    In order to disable the pane resizing, you need to use the MinWidth, MinHeight, MaxWidth and MaxHeight properties of the RadSplitContainer."

    How is this achieved? The ActualWidth/ActualHeight, DesiredSize and RenderSize properties are either zero or the incorrect sizes. I cannot find any suitable properties I can use and also I do not understand why this would freeze the sizes of the panes that are contained in the RadSplitContainer

    Thanks

  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 19 Aug 2011 Link to this post

    Hi,

     The approach described in this article requires you to set concrete sizes in pixels to the MinWidth/Height and MaxWidth/Height properties so using the DesiredSize, ActualWidth/Height, RenderSize may not help you to resolve this problem. Another approach of freezing the SplitContainer resizing is to either remove or disable the Resizer controls for the SplitContainer and PaneGroup templates.

    For example the following code will disable the RadGridResizers in the RadDocking:

    <UserControl x:Class="RadDocking.MainPage"
            mc:Ignorable="d"
            d:DesignHeight="300" d:DesignWidth="400">
      
        <Grid x:Name="LayoutRoot" Background="White">
            <telerik:RadDocking>
                <telerik:RadDocking.Resources>
                    <Style TargetType="telerik:RadGridResizer">
                        <Setter Property="IsHitTestVisible" Value="False" />
                    </Style>
                </telerik:RadDocking.Resources>
                <telerik:RadSplitContainer Orientation="Vertical">
                    <telerik:RadSplitContainer>
                        <telerik:RadPaneGroup>
                            <telerik:RadPane />
                            <telerik:RadPane />
                        </telerik:RadPaneGroup>
                        <telerik:RadPaneGroup>
                            <telerik:RadPane />
                            <telerik:RadPane />
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                    <telerik:RadSplitContainer>
                        <telerik:RadPaneGroup>
                            <telerik:RadPane />
                            <telerik:RadPane />
                        </telerik:RadPaneGroup>
                        <telerik:RadPaneGroup>
                            <telerik:RadPane />
                            <telerik:RadPane />
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadSplitContainer>
            </telerik:RadDocking>
        </Grid>
    </UserControl>

     
    All the best,
    Pana
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  3. DevCraft banner
Back to Top