panels does not get resized with the Main framework windows on window restore

4 posts, 0 answers
  1. Jawad
    Jawad avatar
    10 posts
    Member since:
    Jul 2013

    Posted 09 Jul 2013 Link to this post

    Hi,
    We are using Telerik RadDocking control within our main framework window. The RadDocking contains two RadSplitContainers and each container has a RadPaneGroup with one Rad panel to Display Data. The Application is created using Prism with MEF Container using MVVM design Pattern.

    Description:

    The left Container is Docked Permanently so that it cannon float/Auto hide/Close. This container is set to a minimum Width and Height. As there is no Maximum Width this container is able to fill in available space in the Main Framework Window (e.g. when the panel in the right container is undocked to float the left container takes all the framework window).
    The Right Container is able to Float/Auto Hide/Close. This Container is also set to a minimum Width and Height.

    Issue 1:

    with the Main framework window on full screen if the right Container is moved to the extreme right to its minimum Width and the main framework window is restored/resized the containers doesn't get resize to the main framework window.  This causes the Right docked container and some portion of left docked container to be dragged out of the main framework window and is not visible. To make the right container visible either i need to resize the main framework window to a bigger size or maximise the Main framework window to full screen. The screenshot and an example code snippet is given below. 

    Is there a way to resize the container according to the main framework windows size?  so that both the containers with panel are visible in any scenario whether right docked container is moved to extreme right to its minimum width or left docked container is moved to extreme left to it minimum width.
    I have tried the proportional stack panel with relative width set to both containers but it gives the same issue as above. 


    Thanks,

    <telerik:RadDocking x:Name="SiteHomeDockingControl" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" HasDocumentHost="False" 
                        PreviewShowCompass="SiteHomeDockingControl_PreviewShowCompass"  >
      
                    <telerik:RadSplitContainer telerik:RadDocking.SerializationTag="RadSplitContainerSites" BorderThickness="0"  
                    MinWidth="305" MinHeight="305"  telerik:DockingPanel.InitialSize="1000,500">
                        <telerik:RadPaneGroup x:Name="RadPaneGroupSites" telerik:RadDocking.SerializationTag="RadPaneGroupSites" BorderThickness="0">
                            <telerik:RadPane PaneHeaderVisibility="Collapsed" CanUserClose="False" CanFloat="False" CanUserPin="False" 
                                                 telerik:RadDocking.SerializationTag="RadPaneSites" >
                                <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                                    <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="35,15,15,15">
                                    <TextBlock Text="Just an example Docked Pane 1."/>
                                    </Grid>
                                </ScrollViewer>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
      
                    <telerik:RadSplitContainer InitialPosition="DockedRight" telerik:RadDocking.SerializationTag="RadSplitContainerPlantHierarchies"
                    MinWidth="305" MinHeight="305" telerik:DockingPanel.InitialSize="400,500">
                        <telerik:RadPaneGroup telerik:RadDocking.SerializationTag="RadPaneGroupPlantHierarchies">
                            <telerik:RadPane telerik:RadDocking.SerializationTag="RadPanePlantHierarchies" Header="Plant Hierarchies"
                            IsHidden="{Binding DataContext.HidePlantHierarchies, ElementName=SiteHomeDockingControl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
                                <Grid>
                                <TextBlock Text="Just an example Docked Pane 2."/>
                                </Grid>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
      
    </telerik:RadDocking>
  2. Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 15 Jul 2013 Link to this post

    Hi,

    In the current version of RadDocking it is not possible to set both the MinWidth and relative sizes to the Panes of the control. The approach with which you can achieve the closes to this behavior is:
    • Place the two RadSplitContainer in one parent RadSplitContainer.
    • Set the telerik:ProportionalStackPanel.RelativeSize of the two inner containers.
    • Set the MinWidth of the first RadSplitContainer to for example 305
    • Finally set the MinWidth/MinHeight of the MainWindow

    I created and attached a sample project for you with the described approach, hope this is helpful.


    Regards,
    Ventzi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jawad
    Jawad avatar
    10 posts
    Member since:
    Jul 2013

    Posted 22 Jul 2013 Link to this post

    Hi i have tried your approach but when i restored the main framework window after dragging one pane to its minimum width, both the panes overlapped each other into a blank area in the middle of both panes. if i can solve this it will be great. 

    Thanks, 
  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 23 Jul 2013 Link to this post

    Hello Jawad,

    As mentioned before setting both the MinWidth and relative sizes to the Panes of the control is not possible and may lead to some unexpected behavior. Could you describe to us the exact issue you are experiencing and the steps needed for reproducing it. A screenshot of the issue would be very helpful.

    Regards,
    Vladi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top