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

Sizing a radPane

49 Answers 846 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 27 May 2009, 03:04 PM

I am trying to use radDocking in a Silverlight 2 application to provide panels of additional information (docked) and a context menu (floating).

I'm a little new to Silverlight and have been struggling to resize the radPane elements. Specifically I want to control the initial size of the floating radPane.

I've tried using the RadDocking.FloatingSize property.
For example
<telerikDocking:RadPane Header="Actions..."  telerikDocking:RadDocking.FloatingSize="100 125">

However, when the above radPane is displayed, it is always the same default size. I'm sure I'm missing something simple, but is there a way of controlling the size please?

Thanks in advance...

Jonathan

49 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 28 May 2009, 07:47 AM
Hello Jonathan,

As it is shown in our examples (http://demos.telerik.com/silverlight/#Docking/FirstLook) you can show initially floating pane only if you put it in a RadPaneGroup, put the group into a SplitContainer and mark the whole SplitContainer as floating. The same way you set the initial size of the window and its initial position - by setting the Attached properties RadDocking.FloatingLocation and RadDocking.FloatingSize on the marked as floating SplitContainer

Please take a look at the following example code (it is part of the code from the First look example of the Docking control):
<radDock:RadSplitContainer InitialPosition="FloatingDockable" 
        radDock:RadDocking.FloatingLocation="250, 50" 
        radDock:RadDocking.FloatingSize="300, 220"
    <radDock:RadPaneGroup> 
        <radDock:RadPane Header="floating pane"
            <radDock:RadPane.Content> 
                <TextBlock TextWrapping="Wrap" 
                        Text="some text" /> 
            </radDock:RadPane.Content> 
        </radDock:RadPane> 
    </radDock:RadPaneGroup> 
</radDock:RadSplitContainer> 

Hope this helps you achieve your goal.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Jonathan
Top achievements
Rank 1
answered on 28 May 2009, 08:38 AM
Hello Miroslav,

Many thanks for the fast reply.
I've moved the FloatingSize to the SplitContainer as you have shown and the pane is now sizing correctly when first loaded.
There is still an issue though, that if the user docks the pane and then undocks it, the pane reverts to the default size again rather than using the FloatingSize set in the xaml. Is this expected behaviour?

Thanks again
Jonathan

0
Miroslav Nedyalkov
Telerik team
answered on 28 May 2009, 11:20 AM
Hi Jonathan,

Yes, this is expected as the SplitContainer that holds that information is destroyed with the ToolWindow.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Riccardo
Top achievements
Rank 1
answered on 05 Jun 2009, 01:59 PM
Hello boyz, I've a toolbar and I dock it on right side of RadDocking. I set (on RadSplitContainer) an initial width of 50px. In the RadPane I've a RadWrapPanel with many images (25x25px).

When I drag and drop it on TOP, the height becomes really too much height (100-200px). How can I set that dimension: final result maybe a vertical toolbar (on right dock) or horizontal toolbar (on top dock).

I hope I explian correctly :)
0
Kaloyan
Telerik team
answered on 08 Jun 2009, 03:15 PM
Hello Riccardo,

Could you please provide a sample application that exposes the problem? Also a screen-shot on the desired result would also be of great help.

We apologize for this additional loop required, but we need this information so that we can provide more-to-the-point reply.

Greetings,
Kaloyan
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Riccardo
Top achievements
Rank 1
answered on 09 Jun 2009, 07:50 AM
Dear Kaloyan,
my trouble is really simply.
When you create a RadPane in XAML you may set width / height.
If you create a RadPane "A", docked on RIGHT, you can set Width = 100px and Height = AUTO.

If you drag that RadPane and dock it on TOP, it become Width = AUTO e Height "undefined"... over programmer control. Now I'm try to resolve this trouble via c#... with SizeChanged I track RadPane movement, check its position (dock top,right,left,bottom) and resize it.

Thanks.
Riccardo
0
Kaloyan
Telerik team
answered on 09 Jun 2009, 03:21 PM
Hello Riccardo,

As a workaroung I will suggest that you use the Load event of the RadPane control as RadDocking doesn't expose event that can be used to determine when and where a Pane is dropped. Check the code snippet below as a solution to your case:

 
public Page() 
        { 
            InitializeComponent(); 
 
            pane.Loaded += new RoutedEventHandler(pane_Loaded); 
        } 
 
        private void pane_Loaded(object sender, RoutedEventArgs e) 
        { 
            var pane = sender as RadPane; 
 
            if (pane.IsFloating) return
             
            var parent = pane.ParentOfType<RadSplitContainer>(); 
 
            var dockState = RadDockPanel.GetDock(parent); 
 
            if (parent != null && dockState == Dock.Top) 
            { 
                parent.MaxHeight = 150; 
            } 
        } 

Hope this helps.

Sincerely yours,
Kaloyan
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Riccardo
Top achievements
Rank 1
answered on 09 Jun 2009, 09:32 PM
Sorry but RadPane load event I think is raised only when RadPane ends to be loaded.
I need an event for every time RadPane change its dock status.
I'm working to do it based on SizeChanged event.


0
Kaloyan
Telerik team
answered on 10 Jun 2009, 08:01 AM
Hello Riccardo,

The RadPane Loaded event is firing every time you change its DockState. So there is no problem to put your logic in the Loaded event handler. Also, please make sure you have the latest internal binaries (version - 2009.1.605)

Sincerely yours,
Kaloyan
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Riccardo
Top achievements
Rank 1
answered on 10 Jun 2009, 08:38 AM
Ok thanks. It works. The event "Loaded" coincides with "SizeChanged" event... but the SizeChanged event not raised, when a pane is resized when is floating.
0
Miroslav Nedyalkov
Telerik team
answered on 15 Jun 2009, 08:58 AM
Hello Riccardo,

I'll explain some details about the architecture of the Docking control and I hope this will help you better understand when which event is fired and why.

The Docking control contains SplitContainers and they contain PaneGroups. PaneGroups inherit from TabControl and they contain Panes that inherit from TabControlItem. The Pane has Header and Content part (like the TabControlItem) and the Header part is displayed in the TabStrip panel at the top of the TabControl. The actual Content of the TabItem is displayed in an area in the TabControl, because only one Pane's content is visible in any moment. As the TabControl hosts the Content of the TabItem, it is in the TabControl's visual tree. 

The TabItem's visual representation is only the button with the header. It is not resized with the whole TabControl. This is the reason why the SizeChanged event of Pane is not fired when you resize the PaneGroup (as the PaneGroup is a TabControl and the Pane is a TabItem). The SizeChaged event is fired on the PaneGroup and on the Content of the currently selected Pane. If you need to handle this event we would recommend you to use the event of the Content of the Pane instead of the event of the PaneGroup as the groups are created and destroyed dynamically.

Hope this information is helpful.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Riccardo
Top achievements
Rank 1
answered on 15 Jun 2009, 09:02 AM
@Miroslav: thank you very much for you "hierarchical". Really interesting and useful!
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 04 Sep 2009, 02:57 PM
Hi,
I also have an issue, can you please tell me how i can automatically resize the controls proportionally that i place within a RadPane, so that it is always in proportion and the whole set of controls in the pane are always shown no matter if you float the rad pane and reduce its size of increase it the set of controls will always look fit in and be in proportion?

I am actually using the following hieriachy:
 a stackpanel to house my controls and the stackpanel is within
 a radpane, which is within
 a radpanegroup in within 
a RadSplitContainer within
a Raddocking.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 08 Sep 2009, 11:28 PM
Hi,

Thanks i got the answer u sent to me on my support ticket.

Kingsey Magnus-Eweka  
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 14 Sep 2009, 11:25 AM
.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 14 Sep 2009, 11:43 AM

 Hi Miroslav,
thank you   for the explanation of the archictecture of the rad docking control i now understand it quite a lot more now, but i have a very strange thing that is happening in my code le tme explain this very carefully...
I have a raddock which has 5 Radsplit containers, each split container are docked Left, top, right bottom and center,
I am actually using the format of the raddocking WeatherView example from the telerik Silver documentation
" How to create weather forcast browser"

now here is the sequence of what i am doing and what happens:
within my Left splitcontainer i have 3 RadPaneGroups, i am using the topmost one for a test which is this:
inside of  this top Left radgroup i have a radpane that contains a Grid that houses a Button and a RadChart

like so:

 

<telerikDocking:RadSplitContainer x:Name="rdSpltCtnrLeft" InitialPosition="DockedLeft" Orientation="Vertical"   MinWidth="350">

<telerikDocking:RadPaneGroup x:Name="rdPnGrpTopLeft" MinHeight="232">

<telerikDocking:RadPane x:Name="RadChartPane" Header="RadChart Data" telerikDocking:RadDocking.SerializationTag="RadChartPane" CanDockInDocumentHost="True">

   <telerikDocking:RadPane.Content>

     <Grid  x:Name="grdRadBarChart1">

         <Grid.RowDefinitions>

            <RowDefinition Height="Auto" />

   <RowDefinition Height="*" /> <!-- * is good but when you dock elseWhere there might be unlimited height check at work screen-->

         </Grid.RowDefinitions>

            <!--<Button Content="test stretch"></Button>-->

         <Button Content="Reload" Click="ReloadButton_Click"   VerticalAlignment="Top" HorizontalAlignment="Left" Style="{StaticResource ReloadButtonStyle}" Margin="1,1,0,0" Grid.Row="0"/>

<controlChart:RadChart x:Name="rct"   VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="1,2,0,0" Grid.Row="1"/>

    </Grid>

   </telerikDocking:RadPane.Content>

</telerikDocking:RadPane>

</telerikDocking:RadPaneGroup>

<!—Other radPaneGroups in the LeftSplitContainer-->

<telerikDocking:RadPaneGroup>....</telerikDocking:RadPaneGroup>

<telerikDocking:RadPaneGroup>....</telerikDocking:RadPaneGroup>

<telerikDocking:RadPaneGroup>....</telerikDocking:RadPaneGroup>

</telerikDocking:RadSplitContainer>

 when i move the radpane and go and dock it elsewhere... for example if i dock it to the top split container and then decide to re-dock it in its original position which was on the top left of the Left split container...i am no longer able to get to the grid contained in the radpane
in C# codebehind code

This is placed in the constructor of my silverlight page below

public MainPage()

{

 

   InitializeComponent();

   //......various initializations......

 

this.RadChartPane.Loaded += (pane_Loaded);

}

 

private void pane_Loaded(object sender, RoutedEventArgs e)

        {

            var pane = sender as RadPane;

 

            if (pane.IsFloating)

            {

               

//set the default color to black so that it is the same as the rest of the radpanegroup background and not Gray...until a color is selected!

 

pane.ParentOfType<RadPaneGroup>().Background = new SolidColorBrush(Colors.Black);

 

 //Set the Background of the Pane as it is floating to the currently selected color palette for all the groups

 

pane.ParentOfType<RadPaneGroup>().Background = new SolidColorBrush(this.selector.SelectedColor);

                return;

 

            }

             

            //Get Pane's Parents and Grand Parents to the nth level

            var parentSptCtnr = pane.ParentOfType<RadSplitContainer>();

            var ParentGrp     = pane.ParentOfType<RadPaneGroup>();

 

            //check types...

            string parentType = null; 
            parentType = parentSptCtnr.GetType().ToString();

            parentType = ParentGrp.GetType().ToString();

 

            //*************reset Grid Row height to star when redocked in default position.*********/

            string paneName = pane.Name;

            Grid grid = (Grid)pane.FindName("grdRadBarChart1");

 

//this now becomes null after docking the container Radpane back to its original position hence i cant access the grid or its RowDefinition to set it to "auto"

            if (grid != null)

            {

 

                if (grid.RowDefinitions[1].Height.IsStar)

                {

                    grid.RowDefinitions[1].Height = new GridLength(1, GridUnitType.Auto);

                }

            }

           

            var dockState = RadDockPanel.GetDock(parentSptCtnr);

 

 

            if (parentSptCtnr != null && dockState == Dock.Top)

            {

                 

            }

 

            else if (parentSptCtnr != null && dockState == Dock.Bottom)

            {

 

            }

 

            else if (parentSptCtnr != null && dockState == Dock.Left)

            {

                 string paneName1 = pane.Name;

                 grid = (Grid)pane.FindName("grdRadBarChart1");

                

                

            }

            else if (parentSptCtnr != null && dockState == Dock.Right)

            {

 

            }

        }

 the point of what i am trying to do is to be able to access the grid in the radpane and set its second row definition  from "*" to "Auto" in code behind whenever the radpane is docked back to its original position this is to correct some formatting problems i am having

I need to have the value second row definition of the grid to be set to " * " originally so that my button and radchart is displayed properly in the radpane as it's size is initially small but when i move the radpane and dock it elsewhere and then later re-dock it in the original place position the height becomes unlimited or infinity and does not display correctly so i need to set thhe RowDefinition back to "Auto" when the Radpane goes back to its original docking position to correct this.

so my question is first of all when i dock the radpane back in the original position i can no longer access the Grid element within it in code ( i stepped through the sequence of code having moved the radpane docked it elsewhere and then docked it backin its default position...towards theend of the debugging sequence some how the Grid cannot be reached  

the Grid now has a NULL value in c# code as stated in the  above line:
  
if (grid != null) 

furthermore I am not sure if i am trying to set the Grid.Rowdefinitions in the right event handler...i need an event that is fired when the Radpane is docked back in its original Radsplitcontainer, so that i can create an eventhandler for the Left SplitContainer which knows when a radpane has been removed from it and re-docked in it, but as you explained the radGroups are dynamically created and destroyed so i am not sure, if there will be such and event from the split container and how it will "know" if a radpane hase been docked to it...
now i am not sure if a new splicontainer is created when this happens...i think not as the other radgroups in the left splitcontainer still exists so i need to know the whole sequence of what is dynamically created and destroyed and what does not get destroyed when my sequence of moving a radpane and docking it elsewhere and bringing it back to the original docked position happens..can you please explain the sequence and how i can resove this issue thanks!

Kingsley

 

0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 15 Sep 2009, 10:18 AM
Hi Kaloyan,

I have tweeked you code a little bit....as there is a un forseen error that occurs... on the following line in you original code:
var dockState = RadDockPanel.GetDock(parent); 

this error will occur when you move a radpane from its docked position... to a new docked position
if it is docked in an existing position you will get no error what soever
 but however if you move it to a new position which does not exist before
i.e where a split container does not exist as this will generate a new split container and i am not sure but i think it will generate a new radpanegroup as well..here is the updated code:

private void pane_Loaded(object sender, RoutedEventArgs e)

        {

            var pane = sender as RadPane;

 

            if (pane.IsFloating) return;

 

            var parent = pane.ParentOfType<RadSplitContainer>();

 

            //set to 0 to avoid error when docking pane outside another splitcontainer! as a new split  container is created and i think as well as a new radpanegroup

            //but how you get acces to this new Splitcontainer and radpanegroup which your pane will now exist in...i have no idea

            //is there a way to get access to the new splitcontainer and radpanegroup if indeed a radpane group is created as well

            Dock dockState = 0;

           

            if (parent != null && dockState == Dock.Top)

            {

                dockState = RadDockPanel.GetDock(parent);

            }

           

            if (dockState == Dock.Top)

            {

                parent.MaxHeight = 150;

            }

 

        } 

so if you dont mind can you explain a couple of questions :
firstly ,when a new RadSplitcontainer is created if a RadPaneGroup is also created for you radpane when moved to a new position
secondly how do you get acces to the newly created RadSplitcontainer and RadPaneGroup ?
as Miroslav explained also within this post that splitcontainer and RadpaneGroups are dynamically created and destroyed.

thanks.

it would be great to know exaclty the sequence of what is being created and destroyed dynamically and what stays the same when a radpane is moved from its docking position to a new position and then moved back to its original position (splitcontainer)

1).when the radpane is removed what happens to its default splitcontainer  ? i.e are there any events fired?
is the split container destroyed and re-created...which i think is unlikely as there might be other radpanegroups with radpanes in it..
does it's size changed e.t.c

2).we know that a new split container is created dynamically when you dock your radpane to a new position that does not have an existing splitcontainer, is a new radpanegroup created as well?

3) how can we gain access to this new dynamically created SplitContainer and RadPaneGroup objects?

4). when the radpane is then re-docked (put back) in its default splitcontainer what happens to the split container i.e are there any events fired?
is the split container destroyed and re-created...which i think is unlikely as there might be other radpanegroups with radpanes in it..
does it's size changed e.t.c

if you can answer these questions this will clarify quite a lot of issues for a lot of people myself included.

thank you
Kingsley

0
Kaloyan
Telerik team
answered on 17 Sep 2009, 07:44 AM
Hi Kingsley Magnus-Eweka,

Thank you for the question you have posted. Recently we have added a new event in the RadDocking - PaneStateChange, that is fired whenever a RadPane is changing its state. So you can add an EventHandler to this event and get an instance for the RadPane using the code posted bellow:
<radDock:RadDocking x:Name="dock" PaneStateChange="dock_PaneStateChange" .... 
private void dock_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e) 
        { 
            var pane = e.OriginalSource as RadPane; 
            if(null != pane) 
            { 
                var splitContainer = pane.ParentOfType<RadSplitContainer>(); 
                var paneGroup = pane.ParentOfType<RadPaneGroup>(); 
            } 
        } 
Also when a RadPane is docked somewhere else a new RadSplitContaier and RadPaneGroup is created dynamically and the old one is being destroyed. Let us know if you need something to be clarified

Kind regards,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 18 Sep 2009, 09:35 AM
Hi Kaloyan,
Thanks  for adding the new event 'PaneStateChange' for the RadPane it will prove very very useful for a lot of handling for the Radpane.
 Yes there is still 2 more question... how do i get access to the new Instance of  RadSplitcontainer and its RadPaneGroup that is created when my Radpane is Docked somewhere else?

And how do i get access to my Grid: 

<telerikDocking:RadPane x:Name="RadChartPane" Header="RadChart Data" telerikDocking:RadDocking.SerializationTag="RadChartPane" CanDockInDocumentHost="True">

   <telerikDocking:RadPane.Content>

     <Grid  x:Name="grdRadBarChart1">

         <Grid.RowDefinitions>

            <RowDefinition Height="Auto" />

   <RowDefinition Height="*" /> <!-- * is good but when you dock elseWhere there might be unlimited height check at work screen-->

         </Grid.RowDefinitions>

            <!--<Button Content="test stretch"></Button>-->

         <Button Content="Reload" Click="ReloadButton_Click"   VerticalAlignment="Top" HorizontalAlignment="Left" Style="{StaticResource ReloadButtonStyle}" Margin="1,1,0,0" Grid.Row="0"/>

<controlChart:RadChart x:Name="rct"   VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="1,2,0,0" Grid.Row="1"/>

    </Grid>

   </telerikDocking:RadPane.Content>

</telerikDocking:RadPane>

which is the content of my RadPane when i dock the RadPane in the original position?

Please tryout the sample code i sent to you and try moving the radpane and docking it somewhere else and then try to dock it in its default position... if you put a breakpoint on it ..as you dock the radpane at the original default (the original splitcontainer it was in) position the grid  registers as NULL i dont know why this happens?

The grid is a child of the RadpPane and should be available at all times regardless of where or what the radpane is doing i.e docking elsewhere, floating, resizing, pinned not pinned 
 

can you show an example say within the pane_loaded EventHandler sample that you posted for Ricardo which is on the eight post of this topic?

thanks
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 21 Sep 2009, 08:45 AM
Hi Kaloyan,

Where and how do i access this particular build where you have added this updated new event in the RadDocking - PaneStateChange, that is fired whenever a RadPane is changing its state? I have looked at your most recent beta and it is not listed as one of the recently added stuff in RadDocking?

thanks
Kingsley
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 21 Sep 2009, 03:47 PM

Hi Kaloyan

I finally found the download for the Latest internal build at :
http://www.telerik.com/account/downloads/internal-builds.aspx?type=2&mvid=2079&pid=571

unfortunately it does not work when i use these latest references

i get the following Visual studio Messagebox error:

an unhandled exception ('Unhandled Error in silverlight Application Code:4004
Category: ManagedRuntimeError
Message:System.NotSupportedException: Placing Docking in a panel or control that measures it with infinite width or height is not supported in the...

possible debuggers:
New instance of Visual studio 2008

Kind regards
Kingsley Magnus-Eweka

0
Kaloyan
Telerik team
answered on 22 Sep 2009, 03:22 PM
Hello Kingsley Magnus-Eweka,

I have tested the code posted  by you and it was working properly. To get a particular parent of some RadPane you can use the extension method - ParentOfType<T>. Check the code posted bellow:
private void RadDocking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e) 
        { 
            var radPane = e.OriginalSource as RadPane; 
 
            if (radPane != null
            { 
                var splitContainer = radPane.ParentOfType<RadSplitContainer>(); 
                var splitPaneGroup = radPane.ParentOfType<RadPaneGroup>(); 
 
                if (radPane.IsFloating && splitPaneGroup != null
                { 
                    splitPaneGroup.Background = new SolidColorBrush(Colors.Red); 
                    return
                } 
                var paneContent = radPane.Content; 
            } 
        } 

Also, it is not recommended to put a StackPanel or ScrollViewer as a parent of the RadDocking control as these layout controls measure their children with infinite size, which is causing the error. Let us know if you need some more explanations.

Sincerely yours,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 25 Sep 2009, 09:29 AM
Thanks Guys it works now...
Still there is one thing i'd like to know .. I am trying to take it to the next level....is there a way of Docking a radPane and Undocking a radpane in code? i.e i cant seem to find a Method to Dock a radpane to a splitContainer or a RadPanGroup there  seem to be only Dockstate enum to tell you the State of the RadPane, RadPaneGroup and RadSplitcontainer's docked state,
there does not seem to be a way to access the Object model of the raddocking hence i have very limited information of this control other than the documentation and that of the examples which does not give me much...
for example 
I want to add a functionality of when you click on a radpane docked to a Top, Left , right, bottom Splitcontainer i want it to instantly go and Dock itself in the Middle containter which is essentially the document Host, so that you can click on several radpanes and they will all go and dock in the document host and you can then click on each of their tabs to see which one you want in a bigger view...essentially the documenthost then acts like a main viewer screen....yes i know there is a MoveToDocumentHost() of the radpane that does this....but i dont find a method that does the reverse...because at some point the user might want to click on a radpane in the Documenthost and want that radpane to return back to where itwas previously Docked...is there a way of doing this ?

Thanks Kingsley
0
Miroslav Nedyalkov
Telerik team
answered on 26 Sep 2009, 09:25 AM
Hi Kingsley,

To move RadPane to DocumentHost you could use its method MoveToDocumentHost (as you correctly noticed). When you call it you could save where the pane was (its group) to the Tag property for example. When you want to move it back you could use the following method that moves a RadPane to a specified group:
private static void MovePaneToGroup(RadPane pane, RadPaneGroup targetGroup) 
    if (pane.IsPinned && pane.Parent != targetGroup) 
    { 
        pane.RemoveFromParent(); 
        targetGroup.Items.Add(pane); 
    } 

Kind regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 28 Sep 2009, 08:38 AM
Hi Miroslav,
thanks for your speedy reply and fantastic suggestion, now how do i  save my RadPane to the tag Property of the RadePaneGroup it belongs i cant find anything on that in the documentation, can you show a code sample thanks.
0
Miroslav Nedyalkov
Telerik team
answered on 28 Sep 2009, 11:23 AM
Hello Kingsley,

The idea is to use the Tag property to store the group that originally contains the pane just before moving in the DocumentHost. Here is an example:
private static void MovePaneToDocumentHost(RadPane pane) 
    pane.Tag = pane.Parent; 
    pane.MoveToDocumentHost(); 
 
private static void ReturnPaneToGroup(RadPane pane) 
    RadPaneGroup group = pane.Tag as RadPaneGroup; 
    if (group != null
    { 
        MovePaneToGroup(pane, group); 
    } 
 
private static void MovePaneToGroup(RadPane pane, RadPaneGroup targetGroup) 
    if (pane.IsPinned && pane.Parent != targetGroup) 
    { 
        pane.RemoveFromParent(); 
        targetGroup.Items.Add(pane); 
    } 

Kind regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 29 Sep 2009, 08:20 AM
Hi Kaloyan,
Can you tell me the best way to make sure my silverlight application resizes correctly regardless of the size of my Monitor  or browser settings so that my users can still view the application correctly? that was actually why i had put ScrollViewer as a parent of the RadDocking control...put as you said and as i found out this gives infinite height value..so what would be the appropriate way?

would it be using a Grid as the parent of my RadDocking (That is what i am currently using) but i still need a way for my application to re-flow and resize correclty regardless of the size of the screen or browser type being used to view it, your brilliant suggestions are welcome.

thanks Kingsley
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 29 Sep 2009, 12:41 PM

Hi Kaloyan,
just to Add Silverlight recommends the <Canvas> element MUST be the Top-level container for page Scaling and then you can adjust the page width and height accordingly in code like so:

but since i cant use a container that will give my raddocking infinite height, which Canvas, scrollViewer, StackPanel will obviously do as per the error which container can i now use the grid is no good as it clips some of my controls, which is why silverlight recommends Canvas but since, you guys have now updated the raddocking to through a runtime error whenever its parent is one of the above how do i now implement Page scaling properly ?

as you can see i have commented out the scrollviewer and the Canvas which no longer works due to the infinite size runtime error either of them will produce..

 

<

 

UserControl x:Class="SLDashboardApp.MainPage">
  <!--<Canvas>-->

 

 

 

 

        <!--<ScrollViewer VerticalScrollBarVisibility="Auto">-->

 

 

 

            <

 

Grid x:Name="LayoutRoot1" Visibility="Visible">
                    <telerikDocking:RadDocking x:Name="docking" Grid.Row="1" Background="Black">
                        ...........
                        ..........my contents,> splitcontaners,> radPaneGroups,> RadPanes, >Grid>other controls

 

                 </

 

telerikDocking:RadDocking>

 

 

 

 

 

 

            <!--</Grid>-->

 

 

 

 

 

 

        </Grid>

 

 

 

 

 

 

     <!--</ScrollViewer>-->
    <!--</Canvas>-->

 

 

 

</UserControl>

thanks Kingsley

 

0
Miroslav Nedyalkov
Telerik team
answered on 29 Sep 2009, 01:18 PM
Hello Kingsley,

You can still set Width and Height to your Docking control and use ScrollViewer or  StackPanel with it. This will prevent the Docking control to be measured with infinite size (what doesn't work anyway and this is the reason why we throw runtime error).

Hope this helps.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 29 Sep 2009, 02:16 PM
Hi Miroslav,
thank you i understand that, the issue is what to set it to? so that it is Scalable in any standard screen size 800 x600, 1024 X 768, 1280 X1024 etc. I cant set the Height and width to 100% for example as you can in a aspnet page but i need to set it to something at the same time i dont want to set it to a Fixed  size so that i can take advantage of this in code? so that it will always scale and size correctly?

Kingsley
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 29 Sep 2009, 02:29 PM

Hi Miroslav,
I did not want to set the Raddocking with and Height to a fixed or finite size so that my Page can Scale properly in any Screen size
for example

<Canvas>

     <!--<ScrollViewer VerticalScrollBarVisibility="Auto">-->

     <Grid x:Name="LayoutRoot1" Visibility="Visible">

  <!--Automatic Sizing i cant do this line :-->

         <telerikDocking:RadDocking x:Name="docking" Grid.Row="1" Background="Black" Width="*" Height="*">

 

Or   <!--Proportional Sizing i cant do this line :-->
    <telerikDocking:RadDocking x:Name="docking" Grid.Row="1" Background="Black" Width="Auto" Height="Auto">

so i guess the only work around here is to use a fixed size and then somehow remove the widht and height in code ? not sure how to get around this one

regards
Kingsley

0
Miroslav Nedyalkov
Telerik team
answered on 30 Sep 2009, 09:14 AM
Hi Kingsley,

I did some research about what you could do to achieve your goal and prevent Docking control from being measured with infinite size. I were able to create an attached property that when set to the Docking control does the job.

The idea is the following - the property is of type Size and when is set to the Docking control it tells it to be at least as big as the value of the property. When the parent is resized the new size of the parent and the min size are compared and the bigger one is picked as size of the Docking control. As the actual size of the parent cannot be infinite you won't get the error. 

Please, notice that this is not best way to do this and the code might not be working very well in any scenario.

The attached project includes the code for the attached property and example how to use it.

Hope this helps.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 30 Sep 2009, 11:55 AM
Thanks Miroslav,
I will give it a try.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 02 Oct 2009, 10:11 AM
Hi Miroslav,
can you show how this Xaml

<radDock:RadSplitContainer InitialPosition="FloatingDockable" 
        radDock:RadDocking.FloatingLocation="250, 50" 
        radDock:RadDocking.FloatingSize="300, 220"
    <radDock:RadPaneGroup> 
        <radDock:RadPane Header="floating pane"
            <radDock:RadPane.Content> 
                <TextBlock TextWrapping="Wrap" 
                        Text="some text" /> 
            </radDock:RadPane.Content> 
        </radDock:RadPane> 
    </radDock:RadPaneGroup> 
</radDock:RadSplitContainer> 

 is also done in C# code ? i cant seem to set the 
 radDock:RadDocking.FloatingSize="300, 220
in c# code so that i can specify my newly created splitcontainer as the recipient of the new floatingsize dependency value
here is my c# equivalent code:

I cant seem to set the DependencyProperty correctly what am i doing wrong on that line ?


private

 

void docking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)

 

 

 {

     

var radPane = e.OriginalSource as RadPane;

 

     

if (radPane != null)

 

     {

         

var splitContainer = radPane.ParentOfType<RadSplitContainer>();

 

         

var splitPaneGroup = radPane.ParentOfType<RadPaneGroup>();

 

 

  

 

 

        if (radPane.IsFloating && splitPaneGroup != null)

         {

             

if (splitContainer != null)

 

             splitContainer.Width = 1165;

             splitContainer.InitialPosition = 

DockState.FloatingOnly;

 

 

 

 

 

            docking.ChildrenOfType<

 

            RadSplitContainer>().Add(splitContainer);

 

            docking.SetValue(

 

            RadDocking.SetFloatingSize(new Size(1165, 645)) as DependencyProperty, radPane)); //this Line does not work

 

 

 

            //docking.SetValue((DependencyProperty)radPane, new Size(1165, 645)); //and these as well do not work

 

 

             

//docking.SetValue(DependencyProperty, radPane);

 

 

 

 

 

 

                return;

 

 

 

        }

 

}

i am not using dependencyProperty.Register as i am not creating a new dependency Property all i am trying to do is to Mark my New Dynamic SplitContainer  that is created (as you stated a splitcontainer and radgroup is created for a radpane that is floating) when you undock a radpane and it is floating.
as you can also notice i am doing this within the PanestateChanged so that the dynamic Splitcontainer that is created and destroyes when ever a radpane is docked and undocked will always use the RadDocking.Floatingsize i set in this EventHandler..

thanks
Kingsley

 

 



0
Miroslav Nedyalkov
Telerik team
answered on 02 Oct 2009, 10:47 AM
Hello Kingsley,

If you want to set attached property to a DepedencyObject in C# code you can use the static method called Set<propertyName> that takes 2 arguments - the first one is the DependencyObject, the second one is the value; the other approach is to use the SetValue method of the DependencyObject and to pass the DependecyProperty as first argument and the value as second. Here is an example how to set the FloatingSize attached property:
RadDocking.SetFloatingSize(splitContainer, new Size(200, 200)); 
// OR 
splitContainer.SetValue(RadDocking.FloatingSizeProperty, new Size(200, 200)); 

The same for FloatingLocation, SerizatingTag, etc.

Greetings,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 02 Oct 2009, 11:55 AM

private

 

void docking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)

 

{

 

var radPane = e.OriginalSource as RadPane;

 

 

Dock dockState = 0;

 

 

if (radPane != null)

 

{

 

var splitContainer = radPane.ParentOfType<RadSplitContainer>(); //automatically already added to the raddocking whe dynamically created

 

 

var splitPaneGroup = radPane.ParentOfType<RadPaneGroup>(); //automatically already added to the raddocking whe dynamically created

 

 

//Count number of splitcontainers BEFORE a radpane is undocked and floated

 

 

int zxs = docking.ChildrenOfType<RadSplitContainer>().Count; //value is 6

 

 

if (radPane.IsFloating && splitPaneGroup != null)

 

{

splitContainer.Name =

"Dynamic rdSpCtnr";

 

 

//check to see number of splitcontainers AFTER a radpane is undocked and floated to see if there is an extra Splitcontainer in count to signify

 

 

//the dynamically created SplitContainer when the pane is floating..yes there is a new count value from

 

 

int zxss = docking.ChildrenOfType<RadSplitContainer>().Count; //value is now 7

 

 

//splitContainer.Width = 1;

 

splitContainer.InitialPosition =

DockState.FloatingDockable;

 

 

 

 

//automatically added to the raddocking when dynamically created and removed when destroyed so the immediate line below is not needed.

 

docking.ChildrenOfType<

RadSplitContainer>().Add(splitContainer);

 

 

//trying in vain to set the DependencyProperty to set the floating size of my dynamic splitcontainer

 

 

//docking.SetValue(RadDocking.SetFloatingSize(new Size(1165, 645)), radPane));

 

 

//docking.SetValue((DependencyProperty)radPane, new Size(1165, 645));

 

 

//this should set the Dynamic splitcontainer's Raddocking attached Property(which is a form of dependency property) to the Floating size value

 

 

//but does not work!!

 

 

RadDocking.SetFloatingSize(splitContainer, new Size(1165, 645));

 

 

 

//check if the RadDocking.setFloatingSize has actually affected the dynamic splitContainer floating size in any way?

 

 

double w = splitContainer.Width; //No

 

 

double h = splitContainer.Height; //No

 

 

double aw = splitContainer.ActualWidth; //No

 

 

double ah = splitContainer.ActualHeight; //and No

 

 

return;

 

}

thanks

Kingsley

0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 02 Oct 2009, 12:03 PM
Thanks for your speedy reply Miroslav,
funny enough i have just tried the first approach:

if you see my code i just posted
this line:

 

RadDocking.SetFloatingSize(splitContainer, new Size(1165, 645));

 


it did not work.

regards
Kingsley
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 02 Oct 2009, 12:54 PM
Hi Miroslav ,
here is my updated code i have tried both approaches still does not work here is my full code


public MainPage()

        {

            InitializeComponent();

            docking.PaneStateChange += (docking_PaneStateChange);

         

        }

private void docking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)

        {

            var radPane = e.OriginalSource as RadPane;

 

            Dock dockState = 0;

 

            if (radPane != null)

            {

                var splitContainer = radPane.ParentOfType<RadSplitContainer>(); //automatically already added to the raddocking whe dynamically created

                var splitPaneGroup = radPane.ParentOfType<RadPaneGroup>(); //automatically already added to the raddocking whe dynamically created

 

                //Count number of splitcontainers BEFORE a radpane is undocked and floated

                int zxs = docking.ChildrenOfType<RadSplitContainer>().Count; //value is 6

 

                if (radPane.IsFloating && splitPaneGroup != null)

                {

                    splitContainer.Name = "Dynamic rdSpCtnr";

 

                    //check to see number of splitcontainers AFTER a radpane is undocked and floated to see if there is an extra Splitcontainer in count to signify

                    //the dynamically created SplitContainer when the pane is floating..yes there is a new count value from

                    int zxss = docking.ChildrenOfType<RadSplitContainer>().Count; //value is now 7

 

                    //splitContainer.Width = 1;

                    splitContainer.InitialPosition = DockState.FloatingDockable;

 

 

                    //automatically  added to the raddocking when dynamically created and removed when destroyed so the immediate line below is not needed.

                    docking.ChildrenOfType<RadSplitContainer>().Add(splitContainer);

 

                    //trying in vain to set the DependencyProperty to set the floating size of my dynamic splitcontainer

                    //docking.SetValue(RadDocking.SetFloatingSize(new Size(1165, 645)), radPane));

                    //docking.SetValue((DependencyProperty)radPane, new Size(1165, 645));

 

                    //this should set the Dynamic splitcontainer's Raddocking attached Property(which is a form of dependency property) to the Floating size value

                    //but does not work!!

 

                    //first Approach - Attempt 1

                    RadDocking.SetFloatingSize(splitContainer, new Size(1165, 645));

 

                    //second approach - Attempt 2

                    splitContainer.SetValue(RadDocking.FloatingSizeProperty, new Size(200, 200));

 

                    //check if the RadDocking.setFloatingSize has actually affected the dynamic  splitContainer floating size in any way?

                    double w = splitContainer.Width; //No

                    double h = splitContainer.Height; //No

                    double aw = splitContainer.ActualWidth; //No

                    double ah = splitContainer.ActualHeight; //and No

 

                    return;

                }

 

 

            }


thanks
Kingsley 

        }

0
Miroslav Nedyalkov
Telerik team
answered on 02 Oct 2009, 01:08 PM
Hello Kingsley,

I cannot understand what your goal is and what your code should do. What I can see is that the following line of code is wrong:
docking.ChildrenOfType<RadSplitContainer>().Add(splitContainer); 

If you could explain us in more details what is the goal, we might be able to help.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 02 Oct 2009, 01:52 PM
Hi MiroSlav,
I have since commented that line of code and retried it, still  it does not work my goal is quite simple:
and this is it:

When i undock any radPane from a Splitcontainer and float it

I want to set the Size of the dynamic Splitcontainer that is created for my radPane when it is undocked and is now in the floating state.
and set the the Floating Size of this dynamically created splitcontainer that now houses the floating radPane

so that, i can control the floating size of my radpane  when the PaneStateChange event is called .

private void docking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)

 {

      var radPane = e.OriginalSource as RadPane;

      Dock dockState = 0;

 

      if (radPane != null)

      {

        var splitContainer = radPane.ParentOfType<RadSplitContainer>();


         //automatically already added to the raddocking whe dynamically created

         var splitPaneGroup = radPane.ParentOfType<RadPaneGroup>();


         int CountBefore = docking.ChildrenOfType<RadSplitContainer>().Count; //value is 6

 

         if (radPane.IsFloating && splitPaneGroup != null && splitContainer != null)

         {

           //name dynamic RadSplitContainer and RadPanegroup

           splitContainer.Name = "DynamicRdSpCtnr";

           splitPaneGroup.Name = "DynamicRdSpGrp";

 

           int CountAfter = docking.ChildrenOfType<RadSplitContainer>().Count; //value is now 7


 
        //does not work!! 
         //first Approach

         RadDocking.SetFloatingSize(splitContainer, new Size(1165, 645));

 

         //second approach

         splitContainer.SetValue(RadDocking.FloatingSizeProperty, new Size(200, 200));

                         

          return;

          }

 

     }

  }

 

 

 

 


when i undock and float any of my radpane it floats but the size is jus the default floating size..the floating size does not change to the one set within this method it is either "0.0" for height and width and "NaN" for actual height and width
thanks Kingsley
0
Miroslav Nedyalkov
Telerik team
answered on 02 Oct 2009, 02:35 PM
Hi Kingsley,

The FloatingSize and FloatingLocation properties are not respected if they are set after the ToolWindow is open. If you are not calculating this size in runtime, the correct way to do this is to set the FloatingSize to the pane initially.

If this is not working for you, you could find the ToolWindow and change its size yourself. I don't recommend this approach.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 02 Oct 2009, 03:47 PM


Hi
Miroslav,

do you mean to set the  FloatingSize  to the RadPane Element initially or the Original splitcontainer the rad Pane is in ? and do i need to do this in xaml or in code ?
as you can see i am setting the floatingsize of the original splitcontainer the radpane is in.

<

 

telerikDocking:RadSplitContainer x:Name="rdSpltCtnrRight" InitialPosition="DockedRight" Orientation="Vertical" telerikDocking:RadDocking.FloatingSize="1165, 645"> <!--MinWidth="600"-->

 

 

 

<!--<telerikDocking:RadSplitContainer x:Name="rdSpltCtnrLeft" InitialPosition="DockedLeft" Orientation="Vertical" MinWidth="350">-->

 

 

 

 

<telerikDocking:RadPaneGroup x:Name="rdPnGrpTopRight" MinHeight="232">

 

 

 

<telerikDocking:RadPane x:Name="rdPnTopRightSpendRef" Header="Top Spend Category(Level 1)" telerikDocking:RadDocking.SerializationTag="MorningPane" CanDockInDocumentHost="True"

 

 

CanFloat="True"> <!--MinWidth="600"-->

 

 

 

 

<!--<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">-->

 

 

 

<Grid x:Name="grdR1">

 

 

 

<Grid.RowDefinitions>

 

 

 

<RowDefinition Height="Auto" />

 

 

 

<RowDefinition Height="*" />

 

 

 

<!-- * is good but when you dock elseWhere there might be unlimited height check at work screen-->

 

 

 

</Grid.RowDefinitions>

 

 

 

<TextBlock x:Name="txtblkTpSpndCatLevel1" Text="Top Spend Category 1 Data" Style="{StaticResource TextBlockStyle}" FontSize="12" FontWeight="Bold" Margin="1,0,0,0" Grid.Row="0"/>

 

 

 

<controlChart:RadChart x:Name="rct3DPieChartSpendByRef" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="1,2,0,0" Grid.Row="1" />

 

 

 

</Grid>

 

 

 

<!--</ScrollViewer>-->

 

 

 

</telerikDocking:RadPane>

 

 

 

</telerikDocking:RadPaneGroup>

 

 

 

</telerikDocking:RadSplitContainer>

regards Kingsley

 

0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 02 Oct 2009, 04:01 PM
Hi Miroslav,
I dont use the ToolWindow  appraoch have not even found it yet, i am more interested in the other recommeded approach

can you just show a short sample of the xaml code  or c#  in terms of setting  the FloatingSize to the pane initially that goes with the c# code:

RadDocking.SetFloatingSize(splitContainer, new Size(200, 200)); 
// OR 
splitContainer.SetValue(RadDocking.FloatingSizeProperty, new Size(200, 200)); 

thanks
Kingsley
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 05 Oct 2009, 12:25 PM
Hi MiroSlav,
this code does not work

RadDocking.SetFloatingSize(splitContainer, new Size(200, 200)); 
// OR 
splitContainer.SetValue(RadDocking.FloatingSizeProperty, new Size(200, 200)); 

I tried every possible combination trying to use it with the dynamically created Rad Splitcontainer and RadPaneGroup to set and Have a Standard Floating Size for my radPane other than the default which is too small in my case...still it does not work! 

I created a very small simple application to use it with so that i can see what is happening clearly and my conclusion was that Raddocking.setFloatSize or "myDynamicSplitconttainer.setValue(Raddocking.FloatingSizeProperty, new Size(500, 500) does not change the size of the Splitcontainer nor the RadPaneGroup (dynamically clreated one) 
I also tried setting the initial floatingSize of the radPane as you suggested, still did not work then i tried setting the floating size of the RadPaneGroup still did not work then i also tried setting  the  radSplitContainer  it did not work then I Marked it as FLoatingDockable (in code under PaneStateChanged eventhandler) still it did not work.

I have added my code so you can see exactly what i did,

here is my Xaml:
 

<Grid>

    <telerikDocking:RadDocking x:Name="dock" local:ScrollViewerSizing.MinSize="500, 500">

        <telerikDocking:RadSplitContainer x:Name="splitContainer"> <!--telerikDocking:RadDocking.FloatingSize="1165, 645"-->

            <telerikDocking:RadPaneGroup x:Name="grpPane"> <!--telerikDocking:RadDocking.FloatingSize="1165, 645"-->

                <telerikDocking:RadPane x:Name="rdPnMyPane"  Header="my pane" telerikDocking:RadDocking.FloatingSize="1165, 645">

                    <TextBlock Text="MY PANE " />

                </telerikDocking:RadPane>

            </telerikDocking:RadPaneGroup>

        </telerikDocking:RadSplitContainer>

 

      

    </telerikDocking:RadDocking>

</Grid>

 

 

 

 

 

 

 

Here is the accompanying c# code:

private void docking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)

        {

            var radPane = e.OriginalSource as RadPane;

 

            Dock dockState = 0;

 

                    if (radPane != null)

                    {

                        var splitContainer = radPane.ParentOfType<RadSplitContainer>();

                            //automatically already added to the raddocking whe dynamically created

                        var splitPaneGroup = radPane.ParentOfType<RadPaneGroup>();

                            //automatically already added to the raddocking whe dynamically created

 

                        //Count number of splitcontainers BEFORE a radpane is undocked and floated

                        int CountBefore = docking.ChildrenOfType<RadSplitContainer>().Count; //value is 6

 

                        if (radPane.IsFloating && splitPaneGroup != null && splitContainer != null)

                        {

                            //name dynamic RadSplitContainer and RadPanegroup

                            splitContainer.Name = "DynamicRdSpCtnr";

                            splitPaneGroup.Name = "DynamicRdSpGrp";

 

                            //check to see number of splitcontainers AFTER a radpane is undocked and floated to see if there is an extra Splitcontainer in count to signify

                            //the dynamically created SplitContainer when the pane is floating..yes there is a new count value from

                            int CountAfter = docking.ChildrenOfType<RadSplitContainer>().Count; //value is now 7

 

                            //this should set the Dynamic splitcontainer's Raddocking attached Property(which is a form of dependency property) to the Floating size value

                            //but does not work!!

 

                            //first Approach

                            RadDocking.SetFloatingSize(splitContainer, new Size(1165, 645));

 

                            //second approach

                            splitContainer.SetValue(RadDocking.FloatingSizeProperty, new Size(200, 200));

                            

                            return;

                        }

 

 

                   

                    }

 

        }

 

 

 

 

 

 

 

 

 

 

 

 

 

 Thanks Kingsley

0
Miroslav Nedyalkov
Telerik team
answered on 07 Oct 2009, 08:23 AM
Hello Kingsley,

I'm not sure I can understand the whole situation. Could you please open a support ticket and send us a project that demonstrates what you want to do (without the desired feature to size the ToolWindow properly) and I'll try provide the best way to do this. This will help a lot in picking better and more full solution.

Greetings,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kingsley Magnus-Eweka
Top achievements
Rank 1
answered on 13 Oct 2009, 03:15 PM
Hi Miroslav,
I will do that  would have to put my project using telerik sl controls on hold and look for a replacement product ie Dundas for sl, as the RadDocking control and most of its associated child controls are buggy at best cannot seem to provide all the functionality it is suppose to produce.

i have discovered even more issues...
when are the Latest Beta Assemblies going to be ready (Telerik for SL RadControls)???? i currently have no choice as i am using the Beta so that i can make use of the event PaneStateChange that was added

also only the default theme seems to be working in this assembly without causing an error..let me explain when you use any other theme such as Vista, Summer, office_blue in this Beta Assembly..any non-pinned panes you move your mouse over will not slide into view correctly hence you cannot pin it.
 
when you undock (float) a radpane you cannot set the default floating size a second time, hence this will only work once, but after you dock it and float it again it returns to 'Telerik Specified Floating Size' (something like 200, 300)

amongst other things, i will try to put a project together and send a support ticket when i get the chance but right now our company is really thinking of scrapping Telerik products and refunding thier license as they were very impressed with the look and feel but thinks functionality is still lacking, documentation is poor, even though there are some  great example

so we will see what happens

Kingsley
0
Nikolay
Telerik team
answered on 14 Oct 2009, 07:32 AM
Hi Kingsley Magnus-Eweka,

We really do not want to see you go. I want to clearly indicate that we are willing to assist you further so that you can accomplish the best results with your application. We will be waiting for your reply letting us know on your decision so that we will be able to provide the needed support.

As a side note - in the following couple of days we will be releasing our Beta 2 of RadControls for Silverlight Q3 2009. You can download it and also give it ago. We will include there further improvements and bugfixes in our controls.

Kind regards,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
VeeraMalleswaraRao Gali
Top achievements
Rank 1
answered on 29 May 2010, 01:46 PM
Hello,

I want to avoid a radpane to floating.
Please tell me how to avoid this.

Regards,
Malli.
0
Kaloyan
Telerik team
answered on 01 Jun 2010, 09:30 AM
Hello VeeraMalleswaraRao Gali,

You have to set CanFloat property of the RadPane to false. That will prevent the user to float the pane.

Best wishes,
Kaloyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Docking
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Jonathan
Top achievements
Rank 1
Riccardo
Top achievements
Rank 1
Kaloyan
Telerik team
Kingsley Magnus-Eweka
Top achievements
Rank 1
Nikolay
Telerik team
VeeraMalleswaraRao Gali
Top achievements
Rank 1
Share this question
or