diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes35.csproj b/src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes35.csproj
new file mode 100644
index 0000000000..44d249e3b1
--- /dev/null
+++ b/src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes35.csproj
@@ -0,0 +1,125 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {3836F4A8-4B35-4F5E-BB0F-DAD374297525}
+ library
+ Properties
+ AvalonDock.Themes
+ AvalonDock.Themes
+ v3.5
+ Client
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+
+
+ true
+ full
+ false
+ bin\Debug\v35\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\v35\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {87E61430-4243-45F2-B74E-0A4C096CEBF3}
+ AvalonDock35
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.Designer.cs b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.Designer.cs
index b1b282a8cf..550edbb843 100644
--- a/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.Designer.cs
+++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.Designer.cs
@@ -8,10 +8,10 @@
//
//------------------------------------------------------------------------------
-namespace AvalonDock.Themes.Properties
-{
-
-
+namespace AvalonDock.Themes.Properties {
+ using System;
+
+
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
@@ -22,48 +22,40 @@ namespace AvalonDock.Themes.Properties
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
+ internal class Resources {
+
private static global::System.Resources.ResourceManager resourceMan;
-
+
private static global::System.Globalization.CultureInfo resourceCulture;
-
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
+ internal Resources() {
}
-
+
///
/// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AvalonDock.Themes.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
return resourceCulture;
}
- set
- {
+ set {
resourceCulture = value;
}
}
diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.Designer.cs b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.Designer.cs
index 57f26aa8b7..7a4ed5c849 100644
--- a/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.Designer.cs
+++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.Designer.cs
@@ -8,21 +8,17 @@
//
//------------------------------------------------------------------------------
-namespace AvalonDock.Themes.Properties
-{
-
-
+namespace AvalonDock.Themes.Properties {
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
+
+ public static Settings Default {
+ get {
return defaultInstance;
}
}
diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml b/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml
index 0bef6aafde..95eaabfb06 100644
--- a/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml
+++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml
@@ -283,7 +283,7 @@
x:Name="PART_DragArea"
Background="{StaticResource ManagedContentTabItemNormalBackground}"
CornerRadius="3,0,0,0"
- ContextMenu="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:ContextMenuElement.DockablePane}}}"
+
>
@@ -305,7 +305,7 @@
Style="{StaticResource PaneHeaderCommandStyle}"
Command="ad:ManagedContentCommands.Close"
Width="13" Height="13" Opacity="0.6">
-
+
@@ -385,14 +385,14 @@
-
+ BorderThickness="1,1,1,0"
+ Padding="5,0,5,4"
+ Margin="-1,0,2,-4"
+ CornerRadius="3,3,0,0"
+ Background="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DocumentHeaderBackground}}}">
+
@@ -454,7 +455,7 @@
Text="{TemplateBinding Title}"
Foreground="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DocumentHeaderForeground}}}"/>
-
+
+
+
+
diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml b/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml
index 1e1751be84..6236aac7f3 100644
--- a/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml
+++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml
@@ -322,14 +322,13 @@
Background="{StaticResource ManagedContentTabItemNormalBackground}"
CornerRadius="0,0,2,2"
Padding="1"
- ContextMenu="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:ContextMenuElement.DockablePane}}}"
>
-
+
@@ -517,12 +516,12 @@
TextWrapping="NoWrap"
Text="{TemplateBinding Title}"
Foreground="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DocumentHeaderForeground}}}"/>
-
+
@@ -604,7 +603,7 @@
-
+
@@ -724,7 +723,7 @@
-
+
+ CornerRadius="2">
@@ -1188,9 +1186,7 @@
+ Background="{TemplateBinding Background}">
@@ -1202,7 +1198,6 @@
-
diff --git a/src/Libraries/AvalonDock/AvalonDock/AlignedImage.cs b/src/Libraries/AvalonDock/AvalonDock/AlignedImage.cs
deleted file mode 100644
index ecafc7182f..0000000000
--- a/src/Libraries/AvalonDock/AvalonDock/AlignedImage.cs
+++ /dev/null
@@ -1,187 +0,0 @@
-//Copyright (c) 2007-2010, Adolfo Marinucci
-//All rights reserved.
-
-//Redistribution and use in source and binary forms, with or without modification,
-//are permitted provided that the following conditions are met:
-//
-//* Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-//* Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-//* Neither the name of Adolfo Marinucci nor the names of its contributors may
-// be used to endorse or promote products derived from this software without
-// specific prior written permission.
-//
-//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Controls;
-using System.Windows;
-using System.Windows.Media;
-
-namespace AvalonDock
-{
- public class AlignedImage : Decorator
- {
- public AlignedImage()
- {
- this.LayoutUpdated += new EventHandler(OnLayoutUpdated);
- }
-
- protected override System.Windows.Size MeasureOverride(Size constraint)
- {
- Size desideredSize = new Size();
-
- if (Child != null)
- {
- Child.Measure(constraint);
-
- PresentationSource ps = PresentationSource.FromVisual(this);
- if (ps != null)
- {
- Matrix fromDevice = ps.CompositionTarget.TransformFromDevice;
-
- Vector pixelSize = new Vector(Child.DesiredSize.Width, Child.DesiredSize.Height);
- Vector measureSizeV = fromDevice.Transform(pixelSize);
- desideredSize = new Size(measureSizeV.X, measureSizeV.Y);
- }
- }
-
- return desideredSize;
- }
-
- protected override Size ArrangeOverride(Size arrangeBounds)
- {
- Size finalSize = new Size();
-
- if (Child != null)
- {
- _pixelOffset = GetPixelOffset();
- Child.Arrange(new Rect(_pixelOffset, Child.DesiredSize));
- finalSize = arrangeBounds;
- }
-
- return finalSize;
- }
-
- private Point _pixelOffset;
-
- private void OnLayoutUpdated(object sender, EventArgs e)
- {
- // This event just means that layout happened somewhere. However, this is
- // what we need since layout anywhere could affect our pixel positioning.
- Point pixelOffset = GetPixelOffset();
- if (!AreClose(pixelOffset, _pixelOffset))
- {
- InvalidateArrange();
- }
- }
-
- // Gets the matrix that will convert a point from "above" the
- // coordinate space of a visual into the the coordinate space
- // "below" the visual.
- private Matrix GetVisualTransform(Visual v)
- {
- if (v != null)
- {
- Matrix m = Matrix.Identity;
-
- Transform transform = VisualTreeHelper.GetTransform(v);
- if (transform != null)
- {
- Matrix cm = transform.Value;
- m = Matrix.Multiply(m, cm);
- }
-
- Vector offset = VisualTreeHelper.GetOffset(v);
- m.Translate(offset.X, offset.Y);
-
- return m;
- }
-
- return Matrix.Identity;
- }
-
- private Point TryApplyVisualTransform(Point point, Visual v, bool inverse, bool throwOnError, out bool success)
- {
- success = true;
- if (v != null)
- {
- Matrix visualTransform = GetVisualTransform(v);
- if (inverse)
- {
- if (!throwOnError && !visualTransform.HasInverse)
- {
- success = false;
- return new Point(0, 0);
- }
- visualTransform.Invert();
- }
- point = visualTransform.Transform(point);
- }
- return point;
- }
-
- private Point ApplyVisualTransform(Point point, Visual v, bool inverse)
- {
- bool success = true;
- return TryApplyVisualTransform(point, v, inverse, true, out success);
- }
-
- private Point GetPixelOffset()
- {
- Point pixelOffset = new Point();
-
- PresentationSource ps = PresentationSource.FromVisual(this);
- if (ps != null)
- {
- Visual rootVisual = ps.RootVisual;
-
- // Transform (0,0) from this element up to pixels.
- pixelOffset = this.TransformToAncestor(rootVisual).Transform(pixelOffset);
- pixelOffset = ApplyVisualTransform(pixelOffset, rootVisual, false);
- pixelOffset = ps.CompositionTarget.TransformToDevice.Transform(pixelOffset);
-
- // Round the origin to the nearest whole pixel.
- pixelOffset.X = Math.Round(pixelOffset.X);
- pixelOffset.Y = Math.Round(pixelOffset.Y);
-
- // Transform the whole-pixel back to this element.
- pixelOffset = ps.CompositionTarget.TransformFromDevice.Transform(pixelOffset);
- pixelOffset = ApplyVisualTransform(pixelOffset, rootVisual, true);
- pixelOffset = rootVisual.TransformToDescendant(this).Transform(pixelOffset);
- }
-
- return pixelOffset;
- }
-
- private bool AreClose(Point point1, Point point2)
- {
- return AreClose(point1.X, point2.X) && AreClose(point1.Y, point2.Y);
- }
-
- private bool AreClose(double value1, double value2)
- {
- if (value1 == value2)
- {
- return true;
- }
- double delta = value1 - value2;
- return ((delta < 1.53E-06) && (delta > -1.53E-06));
- }
-
- }
-}
diff --git a/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj b/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj
index 463c98c348..06887dc446 100644
--- a/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj
+++ b/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj
@@ -26,22 +26,23 @@
true
Full
false
- DEBUG;TRACE
+ TRACE;DEBUG;NET4
prompt
4
pdbonly
true
- TRACE
+ TRACE;NET4
prompt
4
+ bin\Release\AvalonDock.XML
true
- AvalonDock.snk
+ ..\..\..\Main\ICSharpCode.SharpDevelop.snk
False
@@ -72,6 +73,7 @@
+
@@ -148,7 +150,6 @@
MSBuild:Compile
Designer
-
@@ -251,6 +252,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Libraries/AvalonDock/AvalonDock/Converters.cs b/src/Libraries/AvalonDock/AvalonDock/Converters.cs
index feae586935..3856ec73b3 100644
--- a/src/Libraries/AvalonDock/AvalonDock/Converters.cs
+++ b/src/Libraries/AvalonDock/AvalonDock/Converters.cs
@@ -101,11 +101,13 @@ namespace AvalonDock
var img = new BitmapImage(iconUri);
if (img != null)
{
- return new Image()
+ return new Image()
{
- UseLayoutRounding = true,
- Width = width,
- Source = img
+#if NET4
+ UseLayoutRounding = true,
+#endif
+ Width = width,
+ Source = img
};
}
}
@@ -115,13 +117,15 @@ namespace AvalonDock
var img = value as BitmapImage;
return new Image()
{
+#if NET4
UseLayoutRounding = true,
+#endif
Width = width,
Source = new BitmapImage(img.UriSource)
};
-
}
+
return value;
}
diff --git a/src/Libraries/AvalonDock/AvalonDock/DockableContent.cs b/src/Libraries/AvalonDock/AvalonDock/DockableContent.cs
index ecbec60d80..322917f0ea 100644
--- a/src/Libraries/AvalonDock/AvalonDock/DockableContent.cs
+++ b/src/Libraries/AvalonDock/AvalonDock/DockableContent.cs
@@ -702,14 +702,12 @@ namespace AvalonDock
if (e.Cancel)
return false;
-
- DockingManager oldManager = Manager;
-
- if (e.Cancel)
- return false;
-
- ((DockablePane)ContainerPane).RemoveContent(
- ContainerPane.Items.IndexOf(this));
+
+ if (ContainerPane != null)
+ {
+ ContainerPane.RemoveContent(
+ ContainerPane.Items.IndexOf(this));
+ }
OnClosed();
return true;
@@ -870,6 +868,12 @@ namespace AvalonDock
"FloatingWindowSize", new SizeConverter().ConvertToInvariantString(FloatingWindowSize));
}
+ if (!FlyoutWindowSize.IsEmpty)
+ {
+ storeWriter.WriteAttributeString(
+ "FlyoutWindowSize", new SizeConverter().ConvertToInvariantString(FlyoutWindowSize));
+ }
+
if (SavedStateAndPosition != null)
{
storeWriter.WriteAttributeString(
@@ -902,6 +906,8 @@ namespace AvalonDock
{
if (contentElement.HasAttribute("FloatingWindowSize"))
FloatingWindowSize = (Size)(new SizeConverter()).ConvertFromInvariantString(contentElement.GetAttribute("FloatingWindowSize"));
+ if (contentElement.HasAttribute("FlyoutWindowSize"))
+ FlyoutWindowSize = (Size)(new SizeConverter()).ConvertFromInvariantString(contentElement.GetAttribute("FlyoutWindowSize"));
Size effectiveSize = new Size(0d, 0d);
if (contentElement.HasAttribute("EffectiveSize"))
@@ -918,7 +924,7 @@ namespace AvalonDock
Guid containerPaneGuid = Guid.Empty;
if (contentElement.HasAttribute("ContainerPaneID"))
{
- containerPaneGuid = Guid.Parse(contentElement.GetAttribute("ContainerPaneID"));
+ containerPaneGuid = new Guid(contentElement.GetAttribute("ContainerPaneID"));
if (Manager != null)
{
@@ -950,5 +956,54 @@ namespace AvalonDock
}
}
#endregion
+
+ #region FlyoutWindowSize
+
+ ///
+ /// FlyoutWindowSize Dependency Property
+ ///
+ public static readonly DependencyProperty FlyoutWindowSizeProperty =
+ DependencyProperty.Register("FlyoutWindowSize", typeof(Size), typeof(DockableContent),
+ new FrameworkPropertyMetadata((Size)Size.Empty,
+ new PropertyChangedCallback(OnFlyoutWindowSizeChanged),
+ new CoerceValueCallback(CoerceFlyoutWindowSizeValue)));
+
+ ///
+ /// Gets or sets the FlyoutWindowSize property. This dependency property
+ /// indicates size of the window hosting this content when is in auto-hidden state.
+ /// This property is persisted when layout of the container is saved.
+ ///
+ public Size FlyoutWindowSize
+ {
+ get { return (Size)GetValue(FlyoutWindowSizeProperty); }
+ set { SetValue(FlyoutWindowSizeProperty, value); }
+ }
+
+ ///
+ /// Handles changes to the FlyoutWindowSize property.
+ ///
+ private static void OnFlyoutWindowSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ }
+
+
+ ///
+ /// Coerces the FlyoutWindowSize value.
+ ///
+ private static object CoerceFlyoutWindowSizeValue(DependencyObject d, object value)
+ {
+ //coerces size to 100.0-100.0
+ Size newSize = (Size)value;
+
+ newSize.Width = Math.Max(100.0, newSize.Width);
+ newSize.Height = Math.Max(100.0, newSize.Height);
+
+ return newSize;
+ }
+
+ #endregion
+
+
+
}
}
diff --git a/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindow.cs b/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindow.cs
index be1fc8fdd1..669ad795ce 100644
--- a/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindow.cs
+++ b/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindow.cs
@@ -59,10 +59,6 @@ namespace AvalonDock
new CoerceValueCallback(OnCoerceValueContentProperty)));
}
- //Pane _previousPane = null;
-
- //int _arrayIndexPreviousPane = -1;
-
internal DockableFloatingWindow(DockingManager manager)
: base(manager)
diff --git a/src/Libraries/AvalonDock/AvalonDock/DockablePane.cs b/src/Libraries/AvalonDock/AvalonDock/DockablePane.cs
index 9f148670fb..a837c8897b 100644
--- a/src/Libraries/AvalonDock/AvalonDock/DockablePane.cs
+++ b/src/Libraries/AvalonDock/AvalonDock/DockablePane.cs
@@ -39,6 +39,8 @@ using System.Diagnostics;
using System.ComponentModel;
using System.Collections;
using System.Linq;
+using System.Windows.Threading;
+using System.Threading;
namespace AvalonDock
{
@@ -108,14 +110,11 @@ namespace AvalonDock
protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
- if (e.NewItems != null)
+ Items.Cast().ForEach(c =>
{
- e.NewItems.Cast().ForEach(c =>
- {
- if (c.State == DockableContentState.None)
- c.SetStateToDock();
- });
- }
+ if (c.State == DockableContentState.None)
+ c.SetStateToDock();
+ });
UpdateCanAutohideProperty();
base.OnItemsChanged(e);
@@ -176,7 +175,20 @@ namespace AvalonDock
_partHeader.MouseRightButtonDown += (s, e) =>
{
- OpenOptionsMenu(null); e.Handled = true;
+ if (_partHeader.ContextMenu == null)
+ {
+ FocusContent();
+ if (_partHeader.ContextMenu == null)
+ {
+ Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(delegate
+ {
+ OpenOptionsMenu(null);
+ }));
+
+ e.Handled = true;
+ }
+
+ }
};
}
@@ -233,7 +245,7 @@ namespace AvalonDock
flag = flag && ((c.DockableStyle & DockableStyle.AutoHide) > 0);
#if DEBUG
- Debug.WriteLine("{0} CanAutohide()= {1}", c.Title, flag);
+ Debug.WriteLine(string.Format("{0} CanAutohide()= {1}", c.Title, flag));
#endif
return flag;
})
@@ -266,93 +278,108 @@ namespace AvalonDock
#region OptionsContextMenu
- ContextMenu cxOptions = null;
- ///
- /// Open the option context menu
- ///
- public bool OpenOptionsMenu(UIElement menuTarget)
+ public override bool OpenOptionsMenu(UIElement menuTarget)
{
if (cxOptions == null)
{
- Debug.Assert(cxOptions == null);
cxOptions = TryFindResource(new ComponentResourceKey(typeof(DockingManager), ContextMenuElement.DockablePane)) as ContextMenu;
- if (cxOptions != null)
- {
- cxOptions.Opened += (s, e) => IsOptionsMenuOpen = true;
- cxOptions.Closed += (s, e) => IsOptionsMenuOpen = false;
- }
- }
-
- if (cxOptions != null)
- {
- cxOptions.DataContext = this.SelectedItem as DockableContent;
-
- foreach (MenuItem menuItem in cxOptions.Items.OfType
@@ -124,18 +122,18 @@
-
+
+
@@ -217,8 +216,7 @@
x:Name="PART_DragArea"
BorderBrush="{StaticResource ManagedContentTabControlNormalBorderBrush}"
Margin="0,0,-10,0"
- SnapsToDevicePixels="True"
- ContextMenu="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:ContextMenuElement.DocumentPane}}}">
+ SnapsToDevicePixels="True">
@@ -249,12 +247,12 @@
x:Name="tabItemTitle"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap"
- Text="{TemplateBinding Title}"
+ Text="{Binding Title, RelativeSource={RelativeSource TemplatedParent}, StringFormat='{}{0} '}"
Foreground="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DocumentHeaderForeground}}}"/>
-
+
@@ -306,7 +304,7 @@
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml b/src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml
index 74cd47ba02..5166402df8 100644
--- a/src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml
+++ b/src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml
@@ -30,7 +30,7 @@
-
+
-
-
-
+
+
+
@@ -248,9 +247,7 @@
TextWrapping="NoWrap"
Text="{TemplateBinding Title}"
Foreground="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DocumentHeaderForeground}}}"/>
-
-
-
+
@@ -303,7 +300,7 @@
-
+
-->
-
+