Content overflow in docked Pane

2 posts, 1 answers
  1. Pascal GUERY
    Pascal GUERY avatar
    38 posts
    Member since:
    Apr 2010

    Posted 04 Nov 2013 Link to this post

    Hi everyone,

    I have developped a sample application showing an issue I have in a real application.
    Here is the markup of the sample application's main window :

    <Window x:Class="DockedPaneOverflow.MainWindow"
            xmlns:sample="clr-namespace:DockedPaneOverflow"
            Title="MainWindow" Height="350" Width="525">
        <telerik:RadDocking>
            <telerik:RadSplitContainer InitialPosition="DockedLeft" Width="240">
                <telerik:RadPaneGroup>
                    <telerik:RadPane>
                        <sample:UserControl1></sample:UserControl1>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
             
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                    </telerik:RadPaneGroup>
                    <telerik:RadPaneGroup>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
        </telerik:RadDocking>
    </Window>

    Here is the markup of UserControl1 :

    <UserControl x:Class="DockedPaneOverflow.UserControl1"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:sample="clr-namespace:DockedPaneOverflow"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 mc:Ignorable="d"
                 d:DesignHeight="300" d:DesignWidth="300">
        <UserControl.Resources>
            <sample:RadGridViewSampleData x:Key="DataSource"/>
        </UserControl.Resources>
     
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="15px"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
     
            <Canvas Grid.Column="0" Grid.Row="0">
                <Menu>
                    <MenuItem Header="Level 1">
                        <MenuItem Header="Level 1.1"/>
                    </MenuItem>
                </Menu>
            </Canvas>
     
            <Canvas Grid.Column="0" Grid.Row="1">
                <telerik:RadGridView x:Name="radGridView" Margin="8"
                                    ItemsSource="{Binding Source={StaticResource DataSource}, Path=Cars}"
                                    Width="600px" Height="394px"/>
            </Canvas>
        </Grid>
    </UserControl>

    The user control's grid overflows the pane as shown on the attached picture.
    Is it a bug ?

    I use the 2012.2.912.40 version of Telerik assemblies.

    Thank you in advance for your answer.
  2. Answer
    Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 06 Nov 2013 Link to this post

    Hi,

    The issue is caused by the Canvas that wraps the RadGridView control. The Canvas control is meant to be used when drawing specific objects that required exact coordinates and that control is rendered above anything else which causes it to extend out of the boundaries of the RadPane.

    I would suggest you to warp the RadGridView control with a different panel than a Canvas for example a Grid. Hope this is 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 >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top