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

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

1 Answer 257 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Sergi
Top achievements
Rank 1
Sergi asked on 06 Jul 2011, 10:30 AM
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.

1 Answer, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 11 Jul 2011, 05:11 PM
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!

Tags
Docking
Asked by
Sergi
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Share this question
or