InvalidOperationException: BuildWindowCore は、ホストされている子ウィンドウのハンドルを戻せませんでした。 StackTrace: 場所 System.Windows.Interop.HwndHost.BuildWindow(HandleRef hwndParent) 場所 System.Windows.Interop.HwndHost.BuildOrReparentWindow() 場所 System.Windows.Interop.HwndHost.OnSourceChanged(Object sender, SourceChangedEventArgs e) 場所 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 場所 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 場所 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 場所 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 場所 System.Windows.PresentationSource.UpdateSourceOfElement(DependencyObject doTarget, DependencyObject doAncestor, DependencyObject doOldParent) 場所 System.Windows.PresentationSource.OnVisualAncestorChanged(DependencyObject uie, AncestorChangedEventArgs e) 場所 System.Windows.UIElement.OnVisualAncestorChanged(Object sender, AncestorChangedEventArgs e) 場所 System.Windows.Media.Visual.ProcessAncestorChangedNotificationRecursive(DependencyObject e, AncestorChangedEventArgs args) 場所 System.Windows.Media.Visual.ProcessAncestorChangedNotificationRecursive(DependencyObject e, AncestorChangedEventArgs args) 場所 System.Windows.Media.Visual.AddVisualChild(Visual child) 場所 System.Windows.FrameworkElement.set_TemplateChild(UIElement value) 場所 System.Windows.Controls.ContentPresenter.UseContentTemplate.BuildVisualTree(FrameworkElement container) 場所 System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) 場所 System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container) 場所 System.Windows.FrameworkElement.ApplyTemplate() 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Controls.Border.MeasureOverride(Size constraint) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Window.MeasureOverrideHelper(Size constraint) 場所 System.Windows.Window.MeasureOverride(Size availableSize) 場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 場所 System.Windows.UIElement.Measure(Size availableSize) 場所 System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam) 場所 System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 場所 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 場所 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 場所 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 場所 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)