Browse Source

Update to AvalonDock 1.3.3585.

pull/14/head
Daniel Grunwald 15 years ago
parent
commit
0c9ddb5f74
  1. 33
      src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml
  2. 12
      src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml
  3. 67
      src/Libraries/AvalonDock/AvalonDock/DockingManager.cs
  4. 7
      src/Libraries/AvalonDock/AvalonDock/DocumentPane.cs
  5. 2
      src/Libraries/AvalonDock/AvalonDock/FloatingDockablePane.cs
  6. 54
      src/Libraries/AvalonDock/AvalonDock/FloatingWindow.cs
  7. 16
      src/Libraries/AvalonDock/AvalonDock/FlyoutPaneWindow.cs
  8. 3
      src/Libraries/AvalonDock/AvalonDock/LogicalTreeAdapter.cs
  9. 32
      src/Libraries/AvalonDock/AvalonDock/NavigatorWindow.cs
  10. 4
      src/Libraries/AvalonDock/AvalonDock/Properties/AssemblyInfo.cs
  11. 5
      src/Libraries/AvalonDock/AvalonDock/Resources/DockablePaneStyles.xaml
  12. 12
      src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.xaml
  13. 10
      src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml

33
src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml

@ -415,6 +415,9 @@ @@ -415,6 +415,9 @@
<Trigger Property ="CanAutohide" Value="False">
<Setter Property="Visibility" Value="Collapsed" TargetName="btnPinAutoHide"/>
</Trigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.IsCloseable}" Value="false">
<Setter Property="Visibility" TargetName="PART_CloseButton" Value="Collapsed"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.State}" Value="AutoHide">
<Setter Property="LayoutTransform" TargetName="btnPinAutoHide">
<Setter.Value>
@ -428,6 +431,36 @@ @@ -428,6 +431,36 @@
</Setter>
</Style>
<!-- FloatingDockablePane -->
<Style x:Key="{x:Type ad:FloatingDockablePane}" TargetType="{x:Type ad:FloatingDockablePane}" >
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DefaultBackgroundBrush}}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ad:DockablePane}">
<Border Focusable="False"
Background="{TemplateBinding Background}">
<Border Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem.Background}"
>
<ContentPresenter
x:Name="PART_SelectedContent"
Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem.Content}"
KeyboardNavigation.TabNavigation="Local"
KeyboardNavigation.DirectionalNavigation="Contained"
KeyboardNavigation.TabIndex="1"
/>
</Border>
</Border>
<ControlTemplate.Triggers>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--DocumentTabItemStyle-->
<Style x:Key="DocumentTabItemStyle" TargetType="{x:Type ad:ManagedContent}">
<Setter Property="Template">

12
src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml

@ -388,7 +388,7 @@ @@ -388,7 +388,7 @@
</Setter>
</Style>
<!--DockablePane-->
<!--DockablePane -->
<Style x:Key="{x:Type ad:DockablePane}" TargetType="{x:Type ad:DockablePane}">
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DefaultBackgroundBrush}}}"/>
<Setter Property="Template">
@ -410,7 +410,7 @@ @@ -410,7 +410,7 @@
CornerRadius="2,2,0,0"
Height="18">
<DockPanel LastChildFill="True">
<Button DockPanel.Dock="Right" Style="{StaticResource PaneHeaderCommandStyle}"
<Button x:Name="btnClose" DockPanel.Dock="Right" Style="{StaticResource PaneHeaderCommandStyle}"
Command="ad:ManagedContentCommands.Close"
ToolTip="{x:Static adRes:Resources.DockablePaneCommands_Close}"
CommandTarget="{TemplateBinding SelectedItem}"
@ -478,6 +478,9 @@ @@ -478,6 +478,9 @@
<Trigger Property ="HasSingleItem" Value="True">
<Setter Property="Visibility" Value="Collapsed" TargetName="PART_Tabs"/>
</Trigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.IsCloseable}" Value="false">
<Setter Property="Visibility" TargetName="btnClose" Value="Collapsed"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.State}" Value="AutoHide">
<Setter Property="LayoutTransform" TargetName="btnPinAutoHide">
<Setter.Value>
@ -491,6 +494,11 @@ @@ -491,6 +494,11 @@
</Setter>
</Style>
<!-- FloatingDockablePane -->
<Style x:Key="{x:Type ad:FloatingDockablePane}" TargetType="{x:Type ad:FloatingDockablePane}" BasedOn="{StaticResource {x:Type ad:DockablePane}}">
</Style>
<!--DocumentTabItemStyle-->
<Style x:Key="DocumentTabItemStyle" TargetType="{x:Type ad:ManagedContent}">
<Setter Property="Template">

67
src/Libraries/AvalonDock/AvalonDock/DockingManager.cs

@ -993,33 +993,6 @@ namespace AvalonDock @@ -993,33 +993,6 @@ namespace AvalonDock
}
#endregion
//#region Commands
//private static object syncRoot = new object();
//private static RoutedUICommand showNavigatorCommand = null;
///// <summary>
///// Get the command to show navigator window
///// </summary>
//public static RoutedUICommand ShowNavigatorWindowCommand
//{
// get
// {
// lock (syncRoot)
// {
// if (null == showNavigatorCommand)
// {
// showNavigatorCommand = new RoutedUICommand("S_how navigator window", "Navigator", typeof(DockingManager));
// showNavigatorCommand.InputGestures.Add(new KeyGesture(Key.Tab, ModifierKeys.Control));
// }
// }
// return showNavigatorCommand;
// }
//}
NavigatorWindow navigatorWindow = null;
void ShowNavigatorWindow()
@ -1954,42 +1927,6 @@ namespace AvalonDock @@ -1954,42 +1927,6 @@ namespace AvalonDock
#endregion
#region Hide/Show contents
// #region HiddenContents
// /// <summary>
// /// HiddenContents Read-Only Dependency Property
// /// </summary>
// private static readonly DependencyPropertyKey HiddenContentsPropertyKey
// = DependencyProperty.RegisterReadOnly("HiddenContents", typeof(ManagedContentCollection<DockableContent>), typeof(DockingManager),
// new FrameworkPropertyMetadata((ManagedContentCollection<DockableContent>)null));
// public static readonly DependencyProperty HiddenContentsProperty
// = HiddenContentsPropertyKey.DependencyProperty;
// /// <summary>
// /// Gets the HiddenContents property. This dependency property
// /// returns the list of <see cref="DockableContent"/> object that are in hidden state.
// /// </summary>
// public ManagedContentCollection<DockableContent> HiddenContents
// {
// get { return (ManagedContentCollection<DockableContent>)GetValue(HiddenContentsProperty); }
// protected set { SetValue(HiddenContentsPropertyKey, value); }
// }
// #endregion
//#if DEBUG
// internal void CheckHiddenState(DockableContent contentToCheck)
// {
// if (contentToCheck.State == DockableContentState.Hidden)
// Debug.Assert(HiddenContents.Contains(contentToCheck));
// else
// Debug.Assert(!HiddenContents.Contains(contentToCheck));
// }
//#endif
/// <summary>
/// Hide a dockable content removing it from its container <see cref="Pane"/>
/// </summary>
@ -2539,10 +2476,6 @@ namespace AvalonDock @@ -2539,10 +2476,6 @@ namespace AvalonDock
}
#endregion
//#if DEBUG
// CheckHiddenState(content);
//#endif
}
#endregion

7
src/Libraries/AvalonDock/AvalonDock/DocumentPane.cs

@ -419,14 +419,15 @@ namespace AvalonDock @@ -419,14 +419,15 @@ namespace AvalonDock
{
if (Items.Count == 0)
{
bool isMainDocPaneToBeClose = IsMainDocumentPane.HasValue &&
bool isMainDocPaneToBeClosed = IsMainDocumentPane.HasValue &&
IsMainDocumentPane.Value;
if (isMainDocPaneToBeClose)
if (isMainDocPaneToBeClosed)
{
DockingManager manager = GetManager();
DocumentPane candidateNewMainDocPane = manager.FindAnotherLogicalChildContained<DocumentPane>(this);
if (candidateNewMainDocPane != null)
if (candidateNewMainDocPane != null &&
candidateNewMainDocPane.GetManager() == this.GetManager())
{
ResizingPanel containerPanel = Parent as ResizingPanel;
if (containerPanel != null)

2
src/Libraries/AvalonDock/AvalonDock/FloatingDockablePane.cs

@ -37,7 +37,7 @@ namespace AvalonDock @@ -37,7 +37,7 @@ namespace AvalonDock
{
static FloatingDockablePane()
{
//DefaultStyleKeyProperty.OverrideMetadata(typeof(FloatingDockablePane), new FrameworkPropertyMetadata(typeof(FloatingDockablePane)));
DefaultStyleKeyProperty.OverrideMetadata(typeof(FloatingDockablePane), new FrameworkPropertyMetadata(typeof(FloatingDockablePane)));
//by design avoid style change
Pane.ShowHeaderProperty.OverrideMetadata(typeof(FloatingDockablePane), new FrameworkPropertyMetadata(false));

54
src/Libraries/AvalonDock/AvalonDock/FloatingWindow.cs

@ -56,8 +56,6 @@ namespace AvalonDock @@ -56,8 +56,6 @@ namespace AvalonDock
{
Window.ShowInTaskbarProperty.OverrideMetadata(typeof(FloatingWindow), new FrameworkPropertyMetadata(false));
Window.WindowStyleProperty.OverrideMetadata(typeof(FloatingWindow), new FrameworkPropertyMetadata(WindowStyle.ToolWindow));
//DefaultStyleKeyProperty.OverrideMetadata(typeof(FloatingWindow), new FrameworkPropertyMetadata(typeof(FloatingWindow)));
}
@ -143,56 +141,6 @@ namespace AvalonDock @@ -143,56 +141,6 @@ namespace AvalonDock
#endregion
//#region HostedPane
///// <summary>
///// HostedPane Read-Only Dependency Property
///// </summary>
//private static readonly DependencyPropertyKey HostedPanePropertyKey
// = DependencyProperty.RegisterReadOnly("HostedPane", typeof(Pane), typeof(FloatingWindow),
// new FrameworkPropertyMetadata((Pane)null,
// new PropertyChangedCallback(OnHostedPaneChanged)));
//public static readonly DependencyProperty HostedPaneProperty
// = HostedPanePropertyKey.DependencyProperty;
///// <summary>
///// Gets the HostedPane property. This dependency property
///// indicates the hosted pane contained into the floating window (an hosted pane can be of type <see cref="FloatingDocumentPane"/> or type <see cref="FloatingDockablePane"/>.
///// </summary>
//public Pane HostedPane
//{
// get { return (Pane)GetValue(HostedPaneProperty); }
//}
///// <summary>
///// Provides a secure method for setting the HostedPane property.
///// This dependency property indicates the hosted pane contained into the floating window (an hosted pane can be of type <see cref="FloatingDocumentPane"/> or type <see cref="FloatingDockablePane"/>.
///// </summary>
///// <param name="value">The new value for the property.</param>
//protected void SetHostedPane(Pane value)
//{
// SetValue(HostedPanePropertyKey, value);
//}
///// <summary>
///// Handles changes to the HostedPane property.
///// </summary>
//private static void OnHostedPaneChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
//{
// ((FloatingWindow)d).OnHostedPaneChanged(e);
//}
///// <summary>
///// Provides derived classes an opportunity to handle changes to the HostedPane property.
///// </summary>
//protected virtual void OnHostedPaneChanged(DependencyPropertyChangedEventArgs e)
//{
//}
//#endregion
protected override void OnInitialized(EventArgs e)
{
@ -595,8 +543,6 @@ namespace AvalonDock @@ -595,8 +543,6 @@ namespace AvalonDock
}
#endregion
internal void CheckContents()
{
if (HostedPane == null)

16
src/Libraries/AvalonDock/AvalonDock/FlyoutPaneWindow.cs

@ -645,7 +645,7 @@ namespace AvalonDock @@ -645,7 +645,7 @@ namespace AvalonDock
Height = 0.0;
animTimer.Stop();
if (!IsClosed)
ClosePane();
Close();
IsClosing = false;
}
};
@ -900,12 +900,20 @@ namespace AvalonDock @@ -900,12 +900,20 @@ namespace AvalonDock
if (!fl.IsVisible)
continue;
//Issue 11545, thx to SrdjanPolic
Rect flRect = new Rect(
PointFromScreen(new Point(fl.Left, fl.Top)),
PointFromScreen(new Point(fl.Left + fl.Width, fl.Top + fl.Height)));
PointFromScreen(new Point(fl.Left, fl.Top)),
PointFromScreen(new Point(fl.Left + fl.RestoreBounds.Width, fl.Top + fl.RestoreBounds.Height)));
if (flRect.IntersectsWith(wndRect))
if (flRect.IntersectsWith(wndRect) && fl.AllowsTransparency == false)
otherRects.Add(Rect.Intersect(flRect, wndRect));
//Rect flRect = new Rect(
// PointFromScreen(new Point(fl.Left, fl.Top)),
// PointFromScreen(new Point(fl.Left + fl.Width, fl.Top + fl.Height)));
//if (flRect.IntersectsWith(wndRect))
// otherRects.Add(Rect.Intersect(flRect, wndRect));
}
IntPtr hDestRegn = InteropHelper.CreateRectRgn(

3
src/Libraries/AvalonDock/AvalonDock/LogicalTreeAdapter.cs

@ -42,6 +42,9 @@ namespace AvalonDock @@ -42,6 +42,9 @@ namespace AvalonDock
{
foreach (var child in adapter.Children())
{
if (child.Item is DockingManager)
continue;
yield return child;
foreach (var grandChild in child.Descendants())

32
src/Libraries/AvalonDock/AvalonDock/NavigatorWindow.cs

@ -186,6 +186,9 @@ namespace AvalonDock @@ -186,6 +186,9 @@ namespace AvalonDock
DockableContents.MoveCurrentTo(null);
Loaded += new RoutedEventHandler(NavigatorWindow_Loaded);
if (Documents.IsEmpty)
MoveToOtherList();
}
#endregion
@ -221,35 +224,6 @@ namespace AvalonDock @@ -221,35 +224,6 @@ namespace AvalonDock
return false;
}
//protected override void OnPreviewKeyDown(KeyEventArgs e)
//{
// if (e.Key == Key.Tab)
// {
// e.Handled = true;
// MoveToNextContent();
// }
// else
// Hide();
// base.OnKeyDown(e);
//}
//protected override void OnPreviewKeyUp(KeyEventArgs e)
//{
// if (e.Key == Key.Tab)
// {
// e.Handled = true;
// }
// else
// {
// var docSelected = (Documents.CurrentItem as NavigatorWindowDocumentItem).ItemContent as DocumentContent;
// docSelected.Activate();
// Hide();
// }
// base.OnPreviewKeyUp(e);
//}
internal static bool IsKeyHandled(Key key)
{
return key == Key.Tab || key == Key.Down ||

4
src/Libraries/AvalonDock/AvalonDock/Properties/AssemblyInfo.cs

@ -51,5 +51,5 @@ using System.Windows; @@ -51,5 +51,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.3571")]
[assembly: AssemblyFileVersion("1.3.3571")]
[assembly: AssemblyVersion("1.3.3585")]
[assembly: AssemblyFileVersion("1.3.3585")]

5
src/Libraries/AvalonDock/AvalonDock/Resources/DockablePaneStyles.xaml

@ -229,4 +229,9 @@ @@ -229,4 +229,9 @@
</Setter.Value>
</Setter>
</Style>
<!-- FloatingDockablePane -->
<Style x:Key="{x:Type ad:FloatingDockablePane}" TargetType="{x:Type ad:FloatingDockablePane}" BasedOn="{StaticResource {x:Type ad:DockablePane}}">
</Style>
</ResourceDictionary>

12
src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.xaml

@ -119,7 +119,7 @@ @@ -119,7 +119,7 @@
BorderBrush="DarkGray"
Height="18">
<DockPanel LastChildFill="True">
<Button DockPanel.Dock="Right" Style="{StaticResource PaneHeaderCommandStyle}" Command="ad:ManagedContentCommands.Close" CommandTarget="{TemplateBinding SelectedItem}"
<Button x:Name="btnClose" DockPanel.Dock="Right" Style="{StaticResource PaneHeaderCommandStyle}" Command="ad:ManagedContentCommands.Close" CommandTarget="{TemplateBinding SelectedItem}"
ToolTip="{x:Static adRes:Resources.DockablePaneCommands_Close}"
Width="15" Height="15" Margin="2,0,2,0" VerticalAlignment="Center">
<ad:ImageEx Source="/AvalonDock;component/resources/Images/PinClose.png" Width="13" />
@ -181,6 +181,9 @@ @@ -181,6 +181,9 @@
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DockablePaneTitleBackgroundSelected}}}" TargetName="PART_Header"/>
<Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey {x:Type ad:DockingManager}, {x:Static ad:AvalonDockBrushes.DockablePaneTitleForegroundSelected}}}" TargetName="paneTitle"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.IsCloseable}" Value="false">
<Setter Property="Visibility" TargetName="btnClose" Value="Collapsed"/>
</DataTrigger>
<Trigger Property ="ShowHeader" Value="False">
<Setter Property="Visibility" Value="Collapsed" TargetName="PART_Header"/>
<Setter Property="BorderThickness" Value="0" TargetName="intContentBorder"/>
@ -205,7 +208,12 @@ @@ -205,7 +208,12 @@
</Setter>
</Style>
<!--DocumentTabItemStyle-->
<!-- FloatingDockablePane -->
<Style x:Key="{x:Type ad:FloatingDockablePane}" TargetType="{x:Type ad:FloatingDockablePane}" BasedOn="{StaticResource {x:Type ad:DockablePane}}">
</Style>
<!--DocumentTabItemStyle-->
<Style x:Key="DocumentTabItemStyle" TargetType="{x:Type ad:ManagedContent}">
<Setter Property="Background"
Value="Transparent"/>

10
src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml

@ -111,7 +111,7 @@ @@ -111,7 +111,7 @@
BorderBrush="DarkGray"
Height="18">
<DockPanel LastChildFill="True">
<Button DockPanel.Dock="Right" Style="{StaticResource PaneHeaderCommandStyle}" Command="ad:ManagedContentCommands.Close" CommandTarget="{TemplateBinding SelectedItem}"
<Button x:Name="btnClose" DockPanel.Dock="Right" Style="{StaticResource PaneHeaderCommandStyle}" Command="ad:ManagedContentCommands.Close" CommandTarget="{TemplateBinding SelectedItem}"
Width="15" Height="15" Margin="2,0,2,0" VerticalAlignment="Center">
<!--<ad:AlignedImage>-->
<ad:ImageEx x:Name="IMG_Close" Source="/AvalonDock;component/resources/Images/Classic/PinClose.png" Width="13" />
@ -185,6 +185,9 @@ @@ -185,6 +185,9 @@
<Trigger Property ="ShowTabs" Value="False">
<Setter Property="Visibility" Value="Collapsed" TargetName="PART_Tabs"/>
</Trigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.IsCloseable}" Value="false">
<Setter Property="Visibility" TargetName="btnClose" Value="Collapsed"/>
</DataTrigger>
<Trigger Property ="HasSingleItem" Value="True">
<Setter Property="Visibility" Value="Collapsed" TargetName="PART_Tabs"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="paneTabsPanel"/>
@ -202,6 +205,11 @@ @@ -202,6 +205,11 @@
</Setter>
</Style>
<!-- FloatingDockablePane -->
<Style x:Key="{x:Type ad:FloatingDockablePane}" TargetType="{x:Type ad:FloatingDockablePane}" BasedOn="{StaticResource {x:Type ad:DockablePane}}">
</Style>
<!--DocumentTabItemStyle-->
<Style x:Key="DocumentTabItemStyle" TargetType="{x:Type ad:ManagedContent}">
<Setter Property="Background"

Loading…
Cancel
Save