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

Dock which fills entire screen

3 Answers 93 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 16 Nov 2010, 07:42 PM
Hi, I am using SL4 and the Q3 telerik controls release.  Can you provide me a simple code sample where a dock takes up the entire horizontal width of a window?  Basically i'm just looking for a horizontal stretch.

3 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 17 Nov 2010, 07:30 AM
Hi Kjell,

A docking control takes up the all available horizontal space by default. I am guessing you wish a single RadPane to stretch horizontally. If so, I suggest that you use a DocumentHost containing a single or multiple RadPanes because it stretches horizontally by default. For example:

<telerik:RadDocking x:Name="radDocking">
  
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup x:Name="radPaneGroup" >
                        <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:RadPane x:Name="radPane3" Header="Document 3">
                            <TextBlock TextWrapping="Wrap" Text=""></TextBlock>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
  
        </telerik:RadDocking>

I hope this will work well for you.

Best wishes,
Dani
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
Kjell
Top achievements
Rank 1
answered on 25 Nov 2010, 12:06 AM
The challenge I am facing is that if I don't specifiy a width for the parent object, then I get an error that the docking control cannot be in a parent with infinite width/height.  However if I do specify a width then it just stays stuck at that width.  Here is my current page layout:


<grid>
    <stackpanel>   
            <radmenu and header image>

THIS IS WHERE I TRIED STARTING MY DOCK

              <busy indicator>
                    <grid>
                            <gridview margin=10,0,10,0>
                            <pager>
                        /grid
                /busy

    /stack
/grid

Right now the gridview will always stretch to fill the entire screen horizontally with a 10 pixel buffer on each side.  What I am trying to do is put that gridview in a docking control, so I tried putting the busy indicator and everything below into the docking control but running into the width issue.  I know this is probably very vague so I am going to keep playing with it and if I can't figure it out I will provide more detail, if you have any ideas please let me know.
0
Kjell
Top achievements
Rank 1
answered on 26 Nov 2010, 10:40 PM
My root container was a stackpanel, changing this to a grid resolved my issue.
Tags
Docking
Asked by
Kjell
Top achievements
Rank 1
Answers by
Dani
Telerik team
Kjell
Top achievements
Rank 1
Share this question
or