How to set the width of the left column of a RadSplitContainer?

2 posts, 0 answers
  1. Sergi
    Sergi avatar
    34 posts
    Member since:
    Sep 2007

    Posted 06 Jul 2011 Link to this post

    How can I set the width by code in a column of the radsplitcontainer?

    I tried setting the width of the item that's inside that column, but then the left and right overlap.

    <telerik:RadDocking x:Name="radDocking" Grid.Row="1">
                <telerik:RadDocking.DocumentHost>
                    <telerik:RadSplitContainer>
                        <telerik:RadPaneGroup x:Name="radPaneGroup2"
                            <telerik:RadPane x:Name="radPaneTools" Header="Options">
                                <StackPanel>
                                    <telerik:RadButton x:Name="btnCustomers" Content="Customers" Click="btnCustomers_Click" />
                                </StackPanel>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                        <telerik:RadPaneGroup x:Name="radPaneDocuments" SelectionChanged="radPaneDocuments_SelectionChanged">
                            <telerik:RadPane x:Name="radPane1" Header="Document 1">
                                <TextBlock TextWrapping="Wrap" Text=""></TextBlock>
                            </telerik:RadPane>
                            <telerik:RadPane x:Name="radPane2" Header="Document 2">
                                <TextBlock TextWrapping="Wrap" Text=""></TextBlock>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadDocking.DocumentHost>
            </telerik:RadDocking>

    I want to make the radPaneGroup2 width fixed, but I can't manage to do it, without it overlapping radPaneDocuments.

    Thanks in advance.
  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 11 Jul 2011 Link to this post

    Hi Sergi,

    RadDocking.DocumentHost supports only relative size values for its children. I would suggest you moving the radPaneGroup2 out of  the DocumentHost and placing it into a RadSplitContainer with fixed width.

        <telerik:RadDocking x:Name="radDocking" Grid.Row="1">
                <telerik:RadSplitContainer Width="300">
                    <telerik:RadPaneGroup x:Name="radPaneGroup2">
                        <telerik:RadPane x:Name="radPaneTools" Header="Options">
                            <StackPanel>
                                <telerik:RadButton x:Name="btnCustomers" Content="Customers"
    Click="btnCustomers_Click" />
                            </StackPanel>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                <telerik:RadDocking.DocumentHost >
                    <telerik:RadSplitContainer>
                        <telerik:RadPaneGroup x:Name="radPaneDocuments" SelectionChanged="radPaneDocuments_SelectionChanged">
                            <telerik:RadPane x:Name="radPane1" Header="Document 1">
                                <TextBlock TextWrapping="Wrap" Text=""></TextBlock>
                            </telerik:RadPane>
                            <telerik:RadPane x:Name="radPane2" Header="Document 2">
                                <TextBlock TextWrapping="Wrap" Text=""></TextBlock>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadDocking.DocumentHost>
            </telerik:RadDocking>

    Hope this helps.

    Greetings,
    Ivo
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top