PRISM + Floating Dock

3 posts, 1 answers
  1. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 25 Jul 2011 Link to this post

    Hi Telerik Team,

    I have 2 questions for floating dock, forgive me not to separate with different thread.

    1. Find existing Floating pane 
     I used following code to specific Radpane is existsed in shell,
    myShell.ChildrenOfType<Telerik.Windows.Controls.RadPane>().Where(k => k.Name.Equals(viewName)).SingleOrDefault();
    but can't get floating radpane. How can I get specific floating pane ?

    2. pane.MakeFloatingDockable().
    As mentioned here in some thread, I often used following code for dynamic float dock creation in prism region and
    It worked well in Q1 in 2011, but in Q2 floating dock doesn't pop up any more without adding pane.MakeFloatingDockable().
    Is this changed by design or something I missing ?

    private void OpenIndiFloatDock(object view, ViewInfo info)
             string regionId = GetFloatRegion(info.Width, info.Height);
             // get view
             RadPane pane = ShellHelper.GetRadPane(view, info);
             _regionManager.Regions[regionId].Add(pane, pane.Name);
         public string GetFloatRegion(int width,int height)
             string regionId = RegionNames.FloatRegion + Guid.NewGuid().ToString();
             RadSplitContainer container = new RadSplitContainer {InitialPosition = DockState.FloatingDockable };
             // set docking size and loc attached propery
             RadDocking.SetFloatingLocation(container, GetCurrentFloatPoint());
             RadDocking.SetFloatingSize(container, new Size(Math.Max(width,400),Math.Max(height,300)));
             // add group
             RadPaneGroup group = new RadPaneGroup();
             //add into manager
             RegionManager.SetRegionName(group, regionId);
             group.SetValue(RegionManager.RegionManagerProperty, _regionManager);
             return regionId;

    Thank you in advance.


  2. Answer
    George avatar
    1332 posts

    Posted 28 Jul 2011 Link to this post

    Hello Yong-Gu Kang, 

    Straight to your questions:

    1. The floating panes are not located in the shell, that's why you cannot find them using this approach. I would suggest using the following code:

    this.dock.Panes.Where(p => p.IsFloating && !p.IsHidden && p.Name == "paneName").FirstOrDefault();

    The RadDocking control keeps a collection of all panes(even the hidden ones) that are not disposed. You could use this collection (RadDocking.Panes) in order to find specific floating pane.

    2. We are not aware of such breaking change in RadDocking control. I tried to reproduce the problem without PRISM but to no avail. Please, refer to the attached project and let me know if I am doing something wrong.

    I am glad to assist you further.

    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. DevCraft R3 2016 release webinar banner
  4. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 03 Aug 2011 Link to this post

    Hi George,

    Thank you for your kind reply.
    I missed to use panel collection, because when I looked this thread for this question, I found a ChildrenOfType first in some thread.
    Regarding  setting floating, I will test more.

Back to Top