RadPaneGroup height problem

6 posts, 0 answers
  1. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 07 Dec 2011 Link to this post

    Hi,

    I have actually in my RadWindow multiple RadPaneGroup. As you can see in attached picture, I lost space from two of them. I would like to know if it's possible to resize both RadPaneGroup in my xaml or in code-behind?

    Thank's
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 07 Dec 2011 Link to this post

    Hi Oliver,

    In order to set an initial size of the SplitContainer you can use the InitialSize attached property of the DockingPanel:
    <telerik:RadSplitContainer Orientation="Horizontal"  Name="splitContainer" telerik:DockingPanel.InitialSize="500">

    Just keep in mind that once the pane is dragged out this size will be lost.

    Hope this helps.

    Greetings,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 07 Dec 2011 Link to this post

    Hi,

    if I try the following line (in bold + italic):

      <telerik:RadSplitContainer InitialPosition="DockedRight" Orientation="Vertical" Width="550">
                    <telerik:RadSplitContainer InitialPosition="DockedRight" Orientation="Horizontal" telerik:DockingPanel.InitialSize="250">

    I have the following error:
    Error 13 Value '250' cannot be assigned to property 'InitialSize'. Premature string termination encountered. D:\Developpement\GestX.Courant\RisGC\Client\DictationModuleWPF\DictationForm.xaml 105 99 DictationModuleWPF

    Thank's

  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 08 Dec 2011 Link to this post

    Hi Oliver,

    Sorry, please set 2 numbers for the size value: telerik:DockingPanel.InitialSize="250, 250"

    Let us know if that helped.

    Kind regards,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  6. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 08 Dec 2011 Link to this post

    Hi,

    I'm not sure I fully understand how the RadSplitterContainierwork :( I included the xaml of my project and I set both splitter to different color (red & green) to show the region I need to adjust and maybe you can help me to achieve what I need to do :)

    PS: I also include a picture of the rendering
    PS: Note that the "Controls" and "Audio" pans shoud have the same height

    <Window x:Class="WpfApplication_Docking.Window2"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:telerikProvider="clr-namespace:Telerik.Windows.Documents.FormatProviders.Rtf;assembly=Telerik.Windows.Documents.FormatProviders.Rtf"       
        Title="Window2" WindowState="Maximized">
       
        <Window.Resources>
            <Style TargetType="telerik:GridViewHeaderRow">
                <Setter Property="MinHeight" Value="5"/>
            </Style>
        </Window.Resources>
       
        <telerik:RadBusyIndicator Name="radBusyIndicator">
            <Grid Name="gridRoot">
               
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <telerik:RadRibbonView Name="radRibbonView" Margin="10 10 10 0" telerik:KeyTipService.IsKeyTipsEnabled="True" MinimizeButtonVisibility="Visible" ApplicationName="Neuron" IsMinimized="True">
                    <telerik:RadRibbonView.Effect>
                        <DropShadowEffect />
                    </telerik:RadRibbonView.Effect>

                    <telerik:RadRibbonView.ApplicationMenu>
                        <telerik:ApplicationMenu telerik:KeyTipService.AccessText="F">
                            <telerik:ApplicationMenu.FooterContent>
                                <StackPanel Height="25" Orientation="Horizontal">
                                    <telerik:RadButton Width="106" Height="22" Margin="3 0" Click="mnuBtnQuit_Click">
                                        <telerik:RadButton.Content>
                                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="3 0  5 0">                                           
                                                <TextBlock Margin="4 0 0 0" VerticalAlignment="Center" Text="Quit" />
                                            </StackPanel>
                                        </telerik:RadButton.Content>
                                    </telerik:RadButton>
                                </StackPanel>
                            </telerik:ApplicationMenu.FooterContent>

                            <telerik:RadRibbonButton Name="mnuBtnPersist" Text="PersistLayout" Click="mnuBtnPersist_Click" />
                            <telerik:Separator />
                            <telerik:RadRibbonButton Name="mnuBtnLockDocking" Text="LockDocking"  Click="mnuBtnLockDocking_Click" />
                            <telerik:RadRibbonButton Name="mnuBtnUnlockDocking" Text="UnlockDocking"  Click="mnuBtnUnlockDocking_Click" />
                            <telerik:Separator />
                            <telerik:RadRibbonButton Name="mnuBtnResetDocking" Text="ResetDocking"  Click="mnuBtnResetDocking_Click" />
                            <telerik:RadRibbonButton Name="mnuBtnResetUserDocking" Text="ResetUserDocking"  Click="mnuBtnResetUserDocking_Click" />
                            <telerik:Separator />
                            <telerik:RadRibbonButton Name="mnuBtnQuit" Text="Quit"  Click="mnuBtnQuit_Click"/>

                        </telerik:ApplicationMenu>
                    </telerik:RadRibbonView.ApplicationMenu>

                    <telerik:RadRibbonView.QuickAccessToolBar>
                        <telerik:QuickAccessToolBar>
                            <telerik:RadRibbonButton SnapsToDevicePixels="True" Click="mnuBtnPersist_Click" ToolTip="PersistLayout"/>
                            <telerik:RadRibbonButton Name="qaBtnLockDocking" SnapsToDevicePixels="True" Click="mnuBtnLockDocking_Click" ToolTip="LockDocking"/>
                            <telerik:RadRibbonButton Name="qaBtnUnlockDocking" SnapsToDevicePixels="True" Click="mnuBtnUnlockDocking_Click" ToolTip="UnlockDocking"/>
                            <telerik:RadRibbonButton SnapsToDevicePixels="True" Click="mnuBtnResetDocking_Click" ToolTip="ResetDocking"/>
                            <telerik:RadRibbonButton SnapsToDevicePixels="True" Click="mnuBtnResetUserDocking_Click" ToolTip="ResetUserDocking"/>
                            <telerik:RadRibbonButton SnapsToDevicePixels="True" Click="mnuBtnQuit_Click" ToolTip="Quit" />
                        </telerik:QuickAccessToolBar>
                    </telerik:RadRibbonView.QuickAccessToolBar>
                </telerik:RadRibbonView>

                <telerik:RadDocking Name="mainDocking" Grid.Row="1" Margin="10" PaneStateChange="mainDocking_PaneStateChange" SizeChanged="mainDocking_SizeChanged">
                    <telerik:RadDocking.Effect>
                        <DropShadowEffect />
                    </telerik:RadDocking.Effect>

                    <telerik:RadDocking.DocumentHost>
                        <telerik:RadSplitContainer Name="splitContainerRight">
                            <telerik:RadPaneGroup Name="panGrpHost">
                                <telerik:RadPane Name="panWebDocuments" Title="ScannedDocs">
                                    <WebBrowser Name="webDocuments" LoadCompleted="webDocuments_LoadCompleted" />
                                </telerik:RadPane>
                            </telerik:RadPaneGroup>
                        </telerik:RadSplitContainer>
                    </telerik:RadDocking.DocumentHost>

                    <telerik:RadSplitContainer InitialPosition="DockedRight" Orientation="Vertical" Background="Green" telerik:DockingPanel.InitialSize="550,550">
                        <telerik:RadSplitContainer InitialPosition="DockedRight" Orientation="Horizontal" Background="Red">
                            <!-- Controls -->
                            <telerik:RadPaneGroup Name="panGrpControls">
                                <telerik:RadPane Name="panControls" Title="Controls" CanDockInDocumentHost="False" CanUserClose="False">
                                    <Grid Margin="5">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>

                                        <telerik:RadButton Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Name="dnDocuments" Margin="0 0 0 5" />
                                        <telerik:RadButton Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Name="dnExams"  Margin="0 0 0 5" />
                                        <CheckBox Grid.Column="0" Grid.Row="2" Name="ckUrgent" Content="Urgent" />
                                        <CheckBox Grid.Column="1" Grid.Row="2" Name="ckSign" Margin="5 0 0 0" Content="Sign" />
                                        <CheckBox Grid.Column="2" Grid.Row="2" Name="ckOnHold" Margin="5 0 0 0" Content="FilmsPending" />
                                    </Grid>
                                </telerik:RadPane>
                            </telerik:RadPaneGroup>

                            <!-- Audio -->
                            <telerik:RadPaneGroup Name="panGrpAudio">
                                <telerik:RadPane Name="panAudio" Title="Audio" CanDockInDocumentHost="False" CanUserClose="False">
                                    <WindowsFormsHost Name="RecorderContainer" />
                                </telerik:RadPane>
                            </telerik:RadPaneGroup>
                        </telerik:RadSplitContainer>

                        <!-- Panel containing visit infos -->
                        <telerik:RadPaneGroup Name="panGrpVisitInfos">
                            <telerik:RadPane Name="panVisitInfos" Title="VisitInfos" CanDockInDocumentHost="False" CanUserClose="False">
                                <Grid Margin="5">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>

                                    <!-- Row #0 -->
                                    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="0" Grid.Row="0" Name="lPatientMRN" Margin="0 2 2 2" Foreground="Green" FontSize="14" FontWeight="Bold"
                                       Content="PatientMRN"/>
                                    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Name="lPatientName" Margin="2" Foreground="Green" FontSize="14" FontWeight="Bold"
                                       Content="PatientFullName"/>
                                    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="3" Grid.Row="0" Name="lGender" Margin="2" Foreground="Green" FontSize="14" FontWeight="Bold" Content="PatientGender"/>
                                    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="4" Grid.Row="0" Name="lPHN" Margin="2" Foreground="Green" FontSize="14" FontWeight="Bold" Content="PatientPHN"/>
                                    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="5" Grid.Row="0" Grid.ColumnSpan="3" Name="lPatientAge" Foreground="Green" Margin="2 2 0 2" FontSize="14" FontWeight="Bold"
                                       Content="PatientAgeString"/>

                                    <!-- Row #1 -->
                                    <Label Grid.Column="0" Grid.Row="1" Content="Date" HorizontalAlignment="Right" Margin="0 2 2 2" />
                                    <TextBox Name="txtVisitDate" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" Margin="2" IsReadOnly="True" Text="VisitTimestamp"/>
                                    <Label Grid.Column="3" Grid.Row="1" Content="Visit" HorizontalAlignment="Right" Margin="2" />
                                    <TextBox Name="txtVisitNumber" Grid.Column="4" Grid.Row="1" Grid.ColumnSpan="3" Margin="2 2 0 2" IsReadOnly="True" Text="VisitNumber"/>

                                    <!-- Row #2 -->
                                    <Label Grid.Column="0" Grid.Row="2" Content="Exams" HorizontalAlignment="Right" Margin="0 2 2 2" />
                                    <TextBox Name="txtExams" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="6" Margin="2 2 0 2" IsReadOnly="True" MouseEnter="txtExams_MouseEnter" MouseLeave="txtExams_MouseLeave" />

                                    <!-- Row #3 -->
                                    <Label Name="lRefPhysician" Grid.Column="0" Grid.Row="3" Content="RefPhysician" HorizontalAlignment="Right" Margin="0 2 2 2" />
                                    <TextBox Name="txtRefPhysician" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="5" Margin="2 2 0 2" IsReadOnly="True" MouseEnter="txtRefPhysician_MouseEnter" MouseLeave="txtRefPhysician_MouseLeave" />
                                    <telerik:RadButton Grid.Column="6" Grid.Row="3" Margin="2 2 0 2" Height="22" VerticalAlignment="Top" Name="btnPhone" Click="btnPhone_Click">
                                       
                                    </telerik:RadButton>

                                    <!-- Row #4 -->
                                    <Label Name="lTech" Grid.Column="0" Grid.Row="4" Content="Technician" HorizontalAlignment="Right" Margin="0 2 2 2" />
                                    <TextBox Name="txtTech" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="6" Margin="2 2 0 2" IsReadOnly="True" />

                                    <!-- Row #5 -->
                                    <Label Name="lComments" Grid.Column="0" Grid.Row="5" Content="Comment}" HorizontalAlignment="Right" Margin="0 2 2 2" />
                                    <TextBox Name="txtComments" Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="6" Margin="2 2 0 2" IsReadOnly="True" Text="Comments"/>

                                    <!-- Row #6 -->
                                    <Label Name="lNote" Grid.Column="0" Grid.Row="6" Content="Note" HorizontalAlignment="Right" Margin="0 2 2 2" />
                                    <TextBox Name="txtNote" Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="6" Margin="2 2 0 2" IsReadOnly="True" Text="Note" />
                                </Grid>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>

                        <!-- Old reports -->
                        <telerik:RadPaneGroup Name="panGrpOldReports">
                            <telerik:RadPane Name="panOldReports" Title="OldReports" CanDockInDocumentHost="False" CanUserClose="False">
                                <Grid Margin="5">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <telerik:RadGridView Name="gridHistorical" Grid.Row="0" IsSynchronizedWithCurrentItem="True" Height="Auto" Width="Auto" IsReadOnly="True" SelectionMode="Single"
                                                     RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False" ShowGroupPanel="False" SelectionUnit="FullRow" SelectionChanged="gridHistorical_SelectionChanged" RowHeight="15">
                                        <telerik:RadGridView.Columns>
                                            <telerik:GridViewDataColumn Header="Date" HeaderTextAlignment="Center" TextAlignment="Center" IsFilterable="False"/>
                                            <telerik:GridViewDataColumn Header="Exams" HeaderTextAlignment="Left" TextAlignment="Left" IsFilterable="False"/>
                                            <telerik:GridViewDataColumn Header="Accession" HeaderTextAlignment="Center" TextAlignment="Center" IsFilterable="False"/>
                                            <telerik:GridViewDataColumn Header="Status" HeaderTextAlignment="Center" TextAlignment="Center" IsFilterable="False"/>
                                        </telerik:RadGridView.Columns>
                                    </telerik:RadGridView>
                                    <GridSplitter Name="oldReportsSplitter" VerticalAlignment="Bottom" HorizontalAlignment="Stretch"
                                    Grid.Row="1" ResizeBehavior="PreviousAndNext" Height="4" ResizeDirection="Rows" Cursor="SizeNS"
                                    MouseEnter="oldReportsSplitter_MouseEnter" MouseLeave="oldReportsSplitter_MouseLeave" />
                                    <telerik:RadRichTextBox Name="radRichTextPreviousReport" Grid.Row="2" IsReadOnly="True" IsSpellCheckingEnabled="False" />
                                    <telerikProvider:RtfDataProvider Grid.Row="2" Name="rtbPreviousReport" RichTextBox="{Binding ElementName=radRichTextPreviousReport}" />
                                </Grid>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>

                        <!-- Current report -->
                        <telerik:RadPaneGroup Name="panGrpCurrentReport">
                            <telerik:RadPane Name="panCurrentReport" Title="CurrentReport" CanDockInDocumentHost="False" CanUserClose="False">
                                <Grid Margin="5">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <telerik:RadComboBox Grid.Column="0" Grid.Row="0" Margin="0 0 0 2" Name="rcbCannedText"
                                                     SelectedValuePath="TheGuid"
                                                     DisplayMemberPath="ListBoxDisplay"
                                                     CanAutocompleteSelectItems="true"
                                                     ClearSelectionButtonContent="ClearSelection"
                                                     ClearSelectionButtonVisibility="Visible"
                                                     IsEditable="True"
                                                     IsReadOnly="False"
                                                     OpenDropDownOnFocus="False"
                                                     IsFilteringEnabled="False"
                                                     TextSearchMode="StartsWith"
                                                     IsDropDownOpen="False"
                                                     EmptyText="EmptyText"
                                                     />
                                    <telerik:RadButton Grid.Column="1" Grid.Row="0" Margin="2 0 0 2" Name="btnCannedText" Click="btnCannedText_Click">                                   
                                    </telerik:RadButton>

                                    <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" DataContext="{Binding ElementName=radRichTextCurrentReport, Path=Commands}">
                                        <telerik:RadRibbonToggleButton Text="B" FontFamily="Times New Roman" FontSize="14" FontWeight="Bold" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleBoldCommand}" />
                                        <telerik:RadRibbonToggleButton Text="I" FontFamily="Times New Roman" FontSize="14" FontStyle="Italic" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleItalicCommand}" />
                                        <telerik:RadRibbonToggleButton FontFamily="Times New Roman" FontSize="14" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleUnderlineCommand}">
                                            <Underline>U</Underline>
                                        </telerik:RadRibbonToggleButton>
                                    </StackPanel>

                                    <telerik:RadRichTextBox Grid.Row="2" Grid.ColumnSpan="2" Name="radRichTextCurrentReport" IsReadOnly="False" IsSpellCheckingEnabled="False" DocumentContentChanged="radRichTextCurrentReport_DocumentContentChanged" />
                                    <telerikProvider:RtfDataProvider Name="rtbCurrentReport" RichTextBox="{Binding ElementName=radRichTextCurrentReport}" />
                                </Grid>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadDocking>
            </Grid>
        </telerik:RadBusyIndicator>
    </Window>


  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 13 Dec 2011 Link to this post

    Hi Oliver,

    The Docking supports absolute sizing only to the root split containers. For the nested split containers you have to use the RelativeSize attached property. You have to put each group in a split container and set the
    telerik:ProportionalStackPanel.RelativeSize attached property as explained in this help article->
    http://www.telerik.com/help/wpf/raddocking-features-split-container.html

    Best wishes,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top
UI for WPF is Visual Studio 2017 Ready