We are using 10.2 b 532 on Windows 7. Pretty beefy machines. We have noticed that it is slow to close docking windows. We use the ribbon and ribbon theme on the docking windows:
Our main window layout is:
(2 tabbed windows in a toolwindow) | Main Document View
What we did was implement "Close All But This" and "Close All" commands in a DockSiteEx : DockSite class.
They look like:
So nothing much too it. If we have 10 windows or so, it takes a few seconds (2 - 4) to close all the windows. Is there any way to speed this up?
Could be something on our end I suppose, but wanted to check if there is some obvious issue with the code.
EDIT: Oh yeah, we get a LOT of System.Windows.Data Error: 4 when we close the windows. I know you have said we can ignore these, but it REALLY effects closing windows speed. 4 seconds to close 10 windows is a bit much.
EDIT 2: We also have a different window type that doesn't cause the System.Windows.Data errors and its a bit faster, but not by a whole lot.
EDIT 3: closing 3 of the windows that cause the errors (because they have property grids in them) spits out 412 warnings :)
[Modified at 03/01/2011 05:19 PM]
Our main window layout is:
(2 tabbed windows in a toolwindow) | Main Document View
What we did was implement "Close All But This" and "Close All" commands in a DockSiteEx : DockSite class.
They look like:
private void dockWndCloseAllButThis_Executed(object sender, ExecutedRoutedEventArgs e)
{
List<DocumentWindow> docWindows = new List<DocumentWindow>();
DockingWindow dw = (DockingWindow)e.Parameter;
foreach (DocumentWindow wnd in DocumentWindows)
{
if (wnd == dw)
continue;
docWindows.Add(wnd);
}
foreach (DocumentWindow wnd in docWindows)
wnd.Close();
e.Handled = true;
}
private void dockWndCloseAllButThis_Executed(object sender, ExecutedRoutedEventArgs e)
{
List<DocumentWindow> docWindows = new List<DocumentWindow>();
foreach (DocumentWindow wnd in DocumentWindows)
docWindows.Add(wnd);
foreach (DocumentWindow wnd in docWindows)
wnd.Close();
e.Handled = true;
}
Could be something on our end I suppose, but wanted to check if there is some obvious issue with the code.
EDIT: Oh yeah, we get a LOT of System.Windows.Data Error: 4 when we close the windows. I know you have said we can ignore these, but it REALLY effects closing windows speed. 4 seconds to close 10 windows is a bit much.
EDIT 2: We also have a different window type that doesn't cause the System.Windows.Data errors and its a bit faster, but not by a whole lot.
EDIT 3: closing 3 of the windows that cause the errors (because they have property grids in them) spits out 412 warnings :)
[Modified at 03/01/2011 05:19 PM]