Hey there,
I have a question about the setFloatingLocation() - method. I want to use it to place a floating pane in the middle of the main window of my app, also after the user has resized the main window. The method works fine for the first time I open the floating pane, but when i close the floating pane, resize the main window and then open the floating pane again, it re-opens at the same position it was before. Whay does the setFloatingLocation(pane, setPosition()); not work?
Thank you for your help!
Regards,
Achim
I have a question about the setFloatingLocation() - method. I want to use it to place a floating pane in the middle of the main window of my app, also after the user has resized the main window. The method works fine for the first time I open the floating pane, but when i close the floating pane, resize the main window and then open the floating pane again, it re-opens at the same position it was before. Whay does the setFloatingLocation(pane, setPosition()); not work?
public void OnNewCbs(RadDocking dockingManager) { RadPane pane = GetPane(dockingManager.Panes, "NewEditCbs"); if (pane != null) { RadDocking.SetFloatingLocation(pane, setPosition()); pane.IsHidden = false; } else { pane = new RadPane(); pane.Header = "New CBS/ Edit current CBS"; pane.Name = "NewEditCbs"; Frame frame = new Frame(); frame.Content = new CbsNewAndEditView(); pane.Content = frame; pane.CanDockInDocumentHost = false; ((RadPaneGroup)((RadSplitContainer)dockingManager.DocumentHost).Items[0]).AddItem(pane, DockPosition.Center); RadDocking.SetFloatingSize(pane, new Size(470, 740)); RadDocking.SetFloatingLocation(pane, setPosition()); pane.MakeFloatingOnly(); } } private Point setPosition() { Double x = ((App)App.Current).MainWindow.Left + (((App)App.Current).MainWindow.ActualWidth / 2.0 - 470.0 / 2.0); Double y = ((App)App.Current).MainWindow.Top + (((App)App.Current).MainWindow.ActualHeight / 2.0 - 740.0 / 2.0); Point p = new Point(x,y); return p; }Thank you for your help!
Regards,
Achim