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 ?
Thank you in advance.
Kang
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);
_regionManager.Regions[regionId].Activate(pane);
// THIS IS ADDITIONALLY NEEDED IN Q2...BY DESIGN ?
pane.MakeFloatingDockable();
}
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();
container.Items.Add(group);
//add into manager
RegionManager.SetRegionName(group, regionId);
group.SetValue(RegionManager.RegionManagerProperty, _regionManager);
this.shell.DockManager.Items.Add(container);
return regionId;
}
Thank you in advance.
Kang