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

Automatically set the height of Second RadPaneGroup inside a RadSplitContainer

0 Answers 74 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Pushpendra
Top achievements
Rank 1
Pushpendra asked on 06 Nov 2012, 11:27 AM

Hi,

I have two RadPaneGroup inside a RadSplitContainer. Initially when screen loaded I am setting my first RadPaneGroup height width using “ProportionalStackPanel.RelativeSize” in xaml. In my second RadPaneGroup I have taken a CheckBox and a RadGridView. When the CheckBox is checked I am showing the RadGridView and if the CheckBox is unchecked I am hiding the RadGridView. When I am showing the RadGridView I am increasing the size of my second RadPaneGroup, and when I am hiding the RadGridView I am decreasing the height of second RadPaneGroup. This I am doing in CheckBox IsChecked Command using following way:
        public bool CheckBoxCommand

        {

            get { return _ checkBoxCommand; }

            set

            {

                _ checkBoxCommand = value;

                if (value)

                {

                    GridViewVisibility = Visibility.Visible;                    Telerik.Windows.Controls.ProportionalStackPanel.SetRelativeSize(_view.SecondPaneGroup, new Size(0, 100));

                }

                else

                {

                    GridViewVisibility = Visibility.Collapsed;

                    Telerik.Windows.Controls.ProportionalStackPanel.SetRelativeSize(_localView. SecondPaneGroup, new Size(0, 25));

                }

                OnPropertyChanged("CheckBoxCommand");

            }

        }

 

This code working fine until user resize the RadPaneGroup manually (using mouse drag-drop to reset the RadPaneGroup size). Once if the user changes the height of any RadPaneGroup, after that height of second RadPaneGroup is not increasing/decreasing using CheckBox check-uncheck.

I tried this in many other ways like setting the heights for RadPaneGroup on check uncheck, but nothing is working as expected. Please help me as soon as psooible.
Following is the code snippet for better understanding:

   
<Grid x:Name="LayoutRoot" Background="White">

        <radDock:RadDocking  AllowUnsafeMode="True">                  
            
    <radDock:RadDocking.DocumentHost>

                  <radDock:RadSplitContainer Orientation="Vertical">

                     <radDock:RadPaneGroup radDock:ProportionalStackPanel.RelativeSize="300, 300" x:Name="FirstPaneGroup">

                        <radDock:RadPane IsPinned="True" CanUserPin="True" CanFloat="False" CanUserClose="False" CanDockInDocumentHost="False" ContextMenuTemplate="{x:Null}" PaneHeaderVisibility="Collapsed"  Visibility="Collapsed">

                            <!--First RadPaneGroup Design-->

                        </radDock:RadPane>

                    </radDock:RadPaneGroup>  

                    <radDock:RadPaneGroup x:Name="SecondPaneGroup">

                        <radDock:RadPane IsPinned="True" CanUserPin="True" CanFloat="False" CanUserClose="False" CanDockInDocumentHost="False" ContextMenuTemplate="{x:Null}" PaneHeaderVisibility="Collapsed"  Visibility="Collapsed">

                            <Grid>

                                <Grid.RowDefinitions>

                                    <RowDefinition Height="22"></RowDefinition>

                                    <RowDefinition Height="Auto"></RowDefinition>

                                </Grid.RowDefinitions>

                                <CheckBox Content="Show Grid" IsChecked="{Binding CheckBoxCommand,Mode=TwoWay}" Grid.Row="0"></CheckBox>

                                <radGrid:RadGridView Visibility="{Binding GridViewVisibility ,Mode=TwoWay}" ItemsSource="{Binding}" SelectedItem="{Binding}" >

                                    <!--Data Grid Columns-->

                                </radGrid:RadGridView>

                            </Grid>

                        </radDock:RadPane>

                    </radDock:RadPaneGroup>

 

                </radDock:RadSplitContainer>

            </radDock:RadDocking.DocumentHost> 
           

            <radDock:RadSplitContainer InitialPosition="DockedLeft">

                <!--Left Screen Design-->

            </radDock:RadSplitContainer>           

            <radDock:RadSplitContainer InitialPosition="DockedRight">

                <!--Right Screen Design-->

            </radDock:RadSplitContainer>

        </radDock:RadDocking>

    </Grid>  

No answers yet. Maybe you can help?

Tags
Docking
Asked by
Pushpendra
Top achievements
Rank 1
Share this question
or