diff --git a/src/Libraries/AvalonDock/DockableFloatingWindow.cs b/src/Libraries/AvalonDock/DockableFloatingWindow.cs index f1374d15ff..dc6663b3bd 100644 --- a/src/Libraries/AvalonDock/DockableFloatingWindow.cs +++ b/src/Libraries/AvalonDock/DockableFloatingWindow.cs @@ -86,9 +86,7 @@ namespace AvalonDock _previousPane = content.ContainerPane; _arrayIndexPreviousPane = _previousPane.Items.IndexOf(content); - - //pane.SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); - //pane.SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); + pane.Style = content.ContainerPane.Style; //remove content from container pane content.ContainerPane.RemoveContent(_arrayIndexPreviousPane); @@ -131,6 +129,8 @@ namespace AvalonDock Height = dockablePane.ActualHeight; } + //transfer the style from the original dockablepane + pane.Style = dockablePane.Style; //Width = dockablePane.ActualWidth; //Height = dockablePane.ActualHeight; @@ -193,13 +193,10 @@ namespace AvalonDock { DockablePane paneToAnchor = new DockablePane(); - //transfer the resizing panel sizes - //paneToAnchor.SetValue(ResizingPanel.ResizeWidthProperty, - // HostedPane.GetValue(ResizingPanel.ResizeWidthProperty)); - //paneToAnchor.SetValue(ResizingPanel.ResizeHeightProperty, - // HostedPane.GetValue(ResizingPanel.ResizeHeightProperty)); ResizingPanel.SetEffectiveSize(paneToAnchor, new Size(Width, Height)); + if (HostedPane.Style != null) + paneToAnchor.Style = HostedPane.Style; int selectedIndex = HostedPane.SelectedIndex; @@ -254,6 +251,10 @@ namespace AvalonDock newContainerPane.Items.Add(HostedPane.RemoveContent(0)); newContainerPane.SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); newContainerPane.SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); + + if (_previousPane.Style != null) + newContainerPane.Style = _previousPane.Style; + Manager.Anchor(newContainerPane, ((DockablePane)_previousPane).Anchor); } else diff --git a/src/Libraries/AvalonDock/DockableTabPanel.cs b/src/Libraries/AvalonDock/DockableTabPanel.cs index 8a4b67fa4c..5c684a74d3 100644 --- a/src/Libraries/AvalonDock/DockableTabPanel.cs +++ b/src/Libraries/AvalonDock/DockableTabPanel.cs @@ -51,7 +51,7 @@ namespace AvalonDock List childsOrderedByWidth = new List(); - foreach (DockableContent child in Children) + foreach (FrameworkElement child in Children) { child.Width = double.NaN; child.Height = double.NaN; diff --git a/src/Libraries/AvalonDock/DocumentPane.cs b/src/Libraries/AvalonDock/DocumentPane.cs index 68c4a11cf8..47379a056a 100644 --- a/src/Libraries/AvalonDock/DocumentPane.cs +++ b/src/Libraries/AvalonDock/DocumentPane.cs @@ -55,6 +55,9 @@ namespace AvalonDock void DocumentPane_Loaded(object sender, RoutedEventArgs e) { + if (Parent == null) + return; + if (GetManager() == null) throw new InvalidOperationException("DocumentPane must be put under a DockingManager!"); diff --git a/src/Libraries/AvalonDock/FlyoutDockablePane.cs b/src/Libraries/AvalonDock/FlyoutDockablePane.cs index a09404b7ef..6b75057884 100644 --- a/src/Libraries/AvalonDock/FlyoutDockablePane.cs +++ b/src/Libraries/AvalonDock/FlyoutDockablePane.cs @@ -62,6 +62,8 @@ namespace AvalonDock //if (double.IsInfinity(ResizingPanel.GetResizeHeight(this))) // ResizingPanel.SetResizeHeight(this, 200); + this.Style = _referencedPane.Style; + //remove content from container pane //and add content to my temporary pane _referencedPane.Items.RemoveAt(_arrayIndexPreviousPane); diff --git a/src/Libraries/AvalonDock/Properties/AssemblyInfo.cs b/src/Libraries/AvalonDock/Properties/AssemblyInfo.cs index 5eb5647c64..6b9b29848c 100644 --- a/src/Libraries/AvalonDock/Properties/AssemblyInfo.cs +++ b/src/Libraries/AvalonDock/Properties/AssemblyInfo.cs @@ -59,4 +59,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.2.2691")] +[assembly: AssemblyVersion("1.2.2702")]