Determine RadPane best location upon creation??

4 posts, 0 answers
  1. David
    David avatar
    9 posts
    Member since:
    Oct 2010

    Posted 10 Sep 2011 Link to this post

    Hi guys,

    Firstly like to say I really love the RadDocking control.  In our application we create RadPanes programmatically and add them to the RadDocking control the same way.  Currently we create all RadPanes at point 150,150 but obviously if the user keeps adding them they stack.

    I'm trying to determine the best way to work out where a "free space" might be on the RadDocking control when I add the RadPane so as not to overlay too many other panes previously added.  I thought about iterating through the current panes and writing a complex function to determine their layout but I thought I'd first ask if there's something currently available or if anyone has done this before?

  2. George
    Admin
    George avatar
    1332 posts

    Posted 15 Sep 2011 Link to this post

    Hello David,

    I would suggest setting the ScrollViewer.HorizontalScrollBarVisibility attached property to the RadPaneGroup in the DocumentHost. This will place the panes into a scrollviewer and it will arrange them automatically.

    Hope this helps.

    Kind regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. David
    David avatar
    9 posts
    Member since:
    Oct 2010

    Posted 16 Sep 2011 Link to this post

    Thanks for the reply, but I dont understand how this fixes my problem.  I tried add this in programmatically (remember all panes/group, etc are being built dynamically when a user presses a button), but it made no difference.  All RadPanes (within the RadGroup attached to the RadDocking) where still created at point 0,0.

    Maybe you could provide a code example please?
  5. George
    Admin
    George avatar
    1332 posts

    Posted 16 Sep 2011 Link to this post

    Hello David,

     
    Could you please attach a screenshot with your scenario? This could shed some light on the problem and it will help us in creating a project that will suit your needs.

    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top