ArgumentException when Dragging Multiple ToolWindows

Docking/MDI for WPF Forum

Posted 13 years ago by Christian Prochnow
Version: 10.2.0533
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar
Hi,

when dragging multiple toolwindows to the Workspace an Exception is thrown:

System.ArgumentException: The TabbedMdiHost cannot open the window 'Toolwindow 1' because it is already open elsewhere.

StackTrace:
bei ActiproSoftware.Windows.Controls.Docking.TabbedMdiHost.b(DockingWindow A_0)
bei ActiproSoftware.Windows.Controls.Docking.TabbedMdiHost.ActiproSoftware.Windows.Controls.Docking.IMdiHost.Open(DockingWindow window)
bei ActiproSoftware.Windows.Controls.Docking.DockSite.u(DependencyObject A_0)
bei ActiproSoftware.Windows.Controls.Docking.DockSite.e(DependencyObject A_0, DependencyObject A_1, Direction A_2)
bei ActiproSoftware.Windows.Controls.Docking.DockSite.a(DependencyObject A_0, IDockTarget A_1, Direction A_2)
bei ActiproSoftware.Windows.Controls.Docking.Primitives.RaftableDockingWindowContainer.OnPreviewWindowExitMove(Object A_0, DockingPreviewEventArgs A_1)
bei ActiproSoftware.Windows.Controls.Docking.Preview.PreviewWindow.StopPreview(DockingPreviewEventArgs A_0)
bei ActiproSoftware.Windows.Controls.Docking.Preview.PreviewWindow.OnMouseUp(Object A_0, MouseButtonEventArgs A_1)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)
bei System.Windows.Application.Run(Window window)
bei System.Windows.Application.Run()
bei WpfApplication1.App.Main() in c:\users\prochnow\documents\visual studio 2010\Projects\WpfApplication1\WpfApplication1\obj\x86\Debug\App.g.cs:Zeile 0.
bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()

Reproducing the bug:

Create and run a MainWindow with the following xaml:

<Window
x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:docking="clr-namespace:ActiproSoftware.Windows.Controls.Docking;assembly=ActiproSoftware.Docking.Wpf351"
Title="MainWindow"
Height="350"
Width="525"
>
<docking:DockSite>
<docking:SplitContainer>
<docking:Workspace>
<docking:TabbedMdiHost />
</docking:Workspace>
<docking:ToolWindowContainer>
<docking:ToolWindow Title="Toolwindow 1">
</docking:ToolWindow>
<docking:ToolWindow Title="Toolwindow 2">
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:SplitContainer>
</docking:DockSite>
</Window>


Try to dock the ToolWindows into the Workspace.
The exception only occurs when multiple ToolWindows are dragged.


Best regards,

Christian Prochnow

[Modified at 01/18/2011 02:06 AM]

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Christian,

Are you sure you are using the latest version? I believe this issue was fixed in the last release.


Actipro Software Support

Posted 13 years ago by Christian Prochnow
Avatar
Indeed. I'm using Build 532 ..
i will try to reproduce with the newest service release.
The latest build of this product (v23.1.3) was released 23 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.