Browse Source

Formatted all of AvalonDock project after adding editor config.

pull/1645/head
Johannes Brittain 7 years ago
parent
commit
bae64f36ad
  1. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs
  2. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneControlOverlayArea.cs
  3. 370
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DragService.cs
  4. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs
  5. 156
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorControl.cs
  6. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs
  7. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs
  8. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs
  9. 36
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs
  10. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs
  11. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs
  12. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs
  13. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs
  14. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs
  15. 70
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs
  16. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs
  17. 114
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs
  18. 72
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs
  19. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/Extentions.cs
  20. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs
  21. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorableFloatingWindow.cs
  22. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePane.cs
  23. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePaneGroup.cs
  24. 82
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutContent.cs
  25. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocument.cs
  26. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentFloatingWindow.cs
  27. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs
  28. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPaneGroup.cs
  29. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutElement.cs
  30. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPanel.cs
  31. 32
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutRoot.cs
  32. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Properties/AssemblyInfo.cs

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs

@ -52,7 +52,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary>
/// Model Dependency Property
/// </summary>
public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutAnchorable ), typeof( AnchorablePaneTitle ),
public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutAnchorable ), typeof( AnchorablePaneTitle ),
new FrameworkPropertyMetadata( ( LayoutAnchorable )null, new PropertyChangedCallback( _OnModelChanged ) ) );
/// <summary>
@ -98,10 +98,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary>
/// LayoutItem Read-Only Dependency Property
/// </summary>
private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( AnchorablePaneTitle ),
private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( AnchorablePaneTitle ),
new FrameworkPropertyMetadata( ( LayoutItem )null ) );
public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty;
public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty;
/// <summary>
/// Gets the LayoutItem property. This dependency property

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneControlOverlayArea.cs

@ -34,7 +34,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
: base( overlayWindow )
{
_documentPaneControl = documentPaneControl;
base.SetScreenDetectionArea( new Rect( _documentPaneControl.PointToScreenDPI( new Point() ), _documentPaneControl.TransformActualSizeToAncestor() ) );
base.SetScreenDetectionArea( new Rect( _documentPaneControl.PointToScreenDPI( new Point() ), _documentPaneControl.TransformActualSizeToAncestor() ) );
}
#endregion

370
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DragService.cs

@ -21,193 +21,193 @@ using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls
{
internal class DragService
{
#region Members
private DockingManager _manager;
private LayoutFloatingWindowControl _floatingWindow;
private List<IOverlayWindowHost> _overlayWindowHosts = new List<IOverlayWindowHost>();
private IOverlayWindowHost _currentHost;
private IOverlayWindow _currentWindow;
private List<IDropArea> _currentWindowAreas = new List<IDropArea>();
private IDropTarget _currentDropTarget;
#endregion
#region Public Methods
public DragService(LayoutFloatingWindowControl floatingWindow)
{
_floatingWindow = floatingWindow;
_manager = floatingWindow.Model.Root.Manager;
GetOverlayWindowHosts();
}
public void UpdateMouseLocation(Point dragPosition)
{
if (!_floatingWindow.Model.Root.ActiveContent.CanDock) return;
var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow;
var newHost = _overlayWindowHosts.FirstOrDefault(oh => oh.HitTest(dragPosition));
if (_currentHost != null || _currentHost != newHost)
{
//is mouse still inside current overlay window host?
if ((_currentHost != null && !_currentHost.HitTest(dragPosition)) ||
_currentHost != newHost)
{
//esit drop target
if (_currentDropTarget != null)
_currentWindow.DragLeave(_currentDropTarget);
_currentDropTarget = null;
//exit area
_currentWindowAreas.ForEach(a =>
_currentWindow.DragLeave(a));
_currentWindowAreas.Clear();
//hide current overlay window
if (_currentWindow != null)
_currentWindow.DragLeave(_floatingWindow);
if (_currentHost != null)
_currentHost.HideOverlayWindow();
_currentHost = null;
}
if (_currentHost != newHost)
{
_currentHost = newHost;
_currentWindow = _currentHost.ShowOverlayWindow(_floatingWindow);
_currentWindow.DragEnter(_floatingWindow);
}
}
else if (_currentHost == null)
{
// there are no dock areas
if (_manager.Parent is DockingManager)
{
_manager = _manager.Parent as DockingManager;
GetOverlayWindowHosts();
UpdateMouseLocation(dragPosition);
}
return;
}
if (_currentDropTarget != null &&
!_currentDropTarget.HitTest(dragPosition))
{
_currentWindow.DragLeave(_currentDropTarget);
_currentDropTarget = null;
}
List<IDropArea> areasToRemove = new List<IDropArea>();
_currentWindowAreas.ForEach(a =>
{
//is mouse still inside this area?
if (!a.DetectionRect.Contains(dragPosition))
{
_currentWindow.DragLeave(a);
areasToRemove.Add(a);
}
});
areasToRemove.ForEach(a =>
_currentWindowAreas.Remove(a));
var areasToAdd =
_currentHost.GetDropAreas(_floatingWindow).Where(cw => !_currentWindowAreas.Contains(cw) && cw.DetectionRect.Contains(dragPosition)).ToList();
_currentWindowAreas.AddRange(areasToAdd);
areasToAdd.ForEach(a =>
_currentWindow.DragEnter(a));
if (_currentDropTarget == null)
{
_currentWindowAreas.ForEach(wa =>
{
if (_currentDropTarget != null)
return;
_currentDropTarget = _currentWindow.GetTargets().FirstOrDefault(dt => dt.HitTest(dragPosition));
if (_currentDropTarget != null)
{
_currentWindow.DragEnter(_currentDropTarget);
return;
}
});
}
}
public void Drop(Point dropLocation, out bool dropHandled)
{
dropHandled = false;
UpdateMouseLocation(dropLocation);
var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow;
var root = floatingWindowModel.Root;
if (_currentHost != null)
_currentHost.HideOverlayWindow();
if (_currentDropTarget != null)
{
_currentWindow.DragDrop(_currentDropTarget);
root.CollectGarbage();
dropHandled = true;
}
_currentWindowAreas.ForEach(a => _currentWindow.DragLeave(a));
if (_currentDropTarget != null)
_currentWindow.DragLeave(_currentDropTarget);
if (_currentWindow != null)
_currentWindow.DragLeave(_floatingWindow);
_currentWindow = null;
_currentHost = null;
}
#endregion
#region Internal Methods
internal void Abort()
{
var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow;
if (_currentWindow != null)
_currentWindowAreas.ForEach(a => _currentWindow.DragLeave(a));
if (_currentDropTarget != null)
_currentWindow.DragLeave(_currentDropTarget);
if (_currentWindow != null)
_currentWindow.DragLeave(_floatingWindow);
_currentWindow = null;
if (_currentHost != null)
_currentHost.HideOverlayWindow();
_currentHost = null;
}
internal class DragService
{
#region Members
private DockingManager _manager;
private LayoutFloatingWindowControl _floatingWindow;
private List<IOverlayWindowHost> _overlayWindowHosts = new List<IOverlayWindowHost>();
private IOverlayWindowHost _currentHost;
private IOverlayWindow _currentWindow;
private List<IDropArea> _currentWindowAreas = new List<IDropArea>();
private IDropTarget _currentDropTarget;
#endregion
#region Public Methods
public DragService( LayoutFloatingWindowControl floatingWindow )
{
_floatingWindow = floatingWindow;
_manager = floatingWindow.Model.Root.Manager;
GetOverlayWindowHosts();
}
public void UpdateMouseLocation( Point dragPosition )
{
if( !_floatingWindow.Model.Root.ActiveContent.CanDock ) return;
var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow;
var newHost = _overlayWindowHosts.FirstOrDefault( oh => oh.HitTest( dragPosition ) );
if( _currentHost != null || _currentHost != newHost )
{
//is mouse still inside current overlay window host?
if( ( _currentHost != null && !_currentHost.HitTest( dragPosition ) ) ||
_currentHost != newHost )
{
//esit drop target
if( _currentDropTarget != null )
_currentWindow.DragLeave( _currentDropTarget );
_currentDropTarget = null;
//exit area
_currentWindowAreas.ForEach( a =>
_currentWindow.DragLeave( a ) );
_currentWindowAreas.Clear();
//hide current overlay window
if( _currentWindow != null )
_currentWindow.DragLeave( _floatingWindow );
if( _currentHost != null )
_currentHost.HideOverlayWindow();
_currentHost = null;
}
if( _currentHost != newHost )
{
_currentHost = newHost;
_currentWindow = _currentHost.ShowOverlayWindow( _floatingWindow );
_currentWindow.DragEnter( _floatingWindow );
}
}
else if( _currentHost == null )
{
// there are no dock areas
if( _manager.Parent is DockingManager )
{
_manager = _manager.Parent as DockingManager;
GetOverlayWindowHosts();
UpdateMouseLocation( dragPosition );
}
return;
}
if( _currentDropTarget != null &&
!_currentDropTarget.HitTest( dragPosition ) )
{
_currentWindow.DragLeave( _currentDropTarget );
_currentDropTarget = null;
}
List<IDropArea> areasToRemove = new List<IDropArea>();
_currentWindowAreas.ForEach( a =>
{
//is mouse still inside this area?
if( !a.DetectionRect.Contains( dragPosition ) )
{
_currentWindow.DragLeave( a );
areasToRemove.Add( a );
}
} );
areasToRemove.ForEach( a =>
_currentWindowAreas.Remove( a ) );
var areasToAdd =
_currentHost.GetDropAreas( _floatingWindow ).Where( cw => !_currentWindowAreas.Contains( cw ) && cw.DetectionRect.Contains( dragPosition ) ).ToList();
_currentWindowAreas.AddRange( areasToAdd );
areasToAdd.ForEach( a =>
_currentWindow.DragEnter( a ) );
if( _currentDropTarget == null )
{
_currentWindowAreas.ForEach( wa =>
{
if( _currentDropTarget != null )
return;
_currentDropTarget = _currentWindow.GetTargets().FirstOrDefault( dt => dt.HitTest( dragPosition ) );
if( _currentDropTarget != null )
{
_currentWindow.DragEnter( _currentDropTarget );
return;
}
} );
}
}
public void Drop( Point dropLocation, out bool dropHandled )
{
dropHandled = false;
UpdateMouseLocation( dropLocation );
var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow;
var root = floatingWindowModel.Root;
if( _currentHost != null )
_currentHost.HideOverlayWindow();
if( _currentDropTarget != null )
{
_currentWindow.DragDrop( _currentDropTarget );
root.CollectGarbage();
dropHandled = true;
}
_currentWindowAreas.ForEach( a => _currentWindow.DragLeave( a ) );
if( _currentDropTarget != null )
_currentWindow.DragLeave( _currentDropTarget );
if( _currentWindow != null )
_currentWindow.DragLeave( _floatingWindow );
_currentWindow = null;
_currentHost = null;
}
#endregion
#region Internal Methods
internal void Abort()
{
var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow;
if( _currentWindow != null )
_currentWindowAreas.ForEach( a => _currentWindow.DragLeave( a ) );
if( _currentDropTarget != null )
_currentWindow.DragLeave( _currentDropTarget );
if( _currentWindow != null )
_currentWindow.DragLeave( _floatingWindow );
_currentWindow = null;
if( _currentHost != null )
_currentHost.HideOverlayWindow();
_currentHost = null;
}
#endregion
#endregion
#region Private Methods
#region Private Methods
private void GetOverlayWindowHosts()
{
_overlayWindowHosts.AddRange(_manager.GetFloatingWindowsByZOrder().OfType<LayoutAnchorableFloatingWindowControl>().Where(fw => fw != _floatingWindow && fw.IsVisible));
_overlayWindowHosts.Add(_manager);
}
private void GetOverlayWindowHosts()
{
_overlayWindowHosts.AddRange( _manager.GetFloatingWindowsByZOrder().OfType<LayoutAnchorableFloatingWindowControl>().Where( fw => fw != _floatingWindow && fw.IsVisible ) );
_overlayWindowHosts.Add( _manager );
}
#endregion
}
#endregion
}
}

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs

@ -38,8 +38,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary>
/// DropDownContextMenu Dependency Property
/// </summary>
public static readonly DependencyProperty DropDownContextMenuProperty = DependencyProperty.Register( "DropDownContextMenu", typeof( ContextMenu ), typeof( DropDownButton ),
new FrameworkPropertyMetadata( ( ContextMenu )null, new PropertyChangedCallback( OnDropDownContextMenuChanged ) ) );
public static readonly DependencyProperty DropDownContextMenuProperty = DependencyProperty.Register( "DropDownContextMenu", typeof( ContextMenu ), typeof( DropDownButton ),
new FrameworkPropertyMetadata( ( ContextMenu )null, new PropertyChangedCallback( OnDropDownContextMenuChanged ) ) );
/// <summary>
/// Gets or sets the DropDownContextMenu property. This dependency property
@ -82,7 +82,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary>
/// DropDownContextMenuDataContext Dependency Property
/// </summary>
public static readonly DependencyProperty DropDownContextMenuDataContextProperty = DependencyProperty.Register( "DropDownContextMenuDataContext", typeof( object ), typeof( DropDownButton ),
public static readonly DependencyProperty DropDownContextMenuDataContextProperty = DependencyProperty.Register( "DropDownContextMenuDataContext", typeof( object ), typeof( DropDownButton ),
new FrameworkPropertyMetadata( ( object )null ) );
/// <summary>

156
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorControl.cs

@ -131,98 +131,98 @@ namespace Xceed.Wpf.AvalonDock.Controls
_openUpTimer = null;
_model.Root.Manager.ShowAutoHideWindow( this );
if (!_manuallyOpened)
{
_clickGracePeriodTimer = new DispatcherTimer(DispatcherPriority.ApplicationIdle);
_clickGracePeriodTimer.Interval = TimeSpan.FromMilliseconds(1000);
_inGracePeriod = true;
_clickGracePeriodTimer.Tick += new EventHandler(_clickGracePeriodTimer_Tick);
_clickGracePeriodTimer.Start();
}
_manuallyOpened = false;
}
private void _clickGracePeriodTimer_Tick(object sender, EventArgs e)
{
StopGraceTimer();
}
private void StopGraceTimer()
{
_clickGracePeriodTimer.Tick -= new EventHandler(_clickGracePeriodTimer_Tick);
_clickGracePeriodTimer.Stop();
_clickGracePeriodTimer = null;
_inGracePeriod = false;
}
#endregion
#region Overrides
//protected override void OnVisualParentChanged(DependencyObject oldParent)
//{
// base.OnVisualParentChanged(oldParent);
if( !_manuallyOpened )
{
_clickGracePeriodTimer = new DispatcherTimer( DispatcherPriority.ApplicationIdle );
_clickGracePeriodTimer.Interval = TimeSpan.FromMilliseconds( 1000 );
_inGracePeriod = true;
_clickGracePeriodTimer.Tick += new EventHandler( _clickGracePeriodTimer_Tick );
_clickGracePeriodTimer.Start();
}
// var contentModel = _model;
_manuallyOpened = false;
}
// if (oldParent != null && contentModel != null && contentModel.Content is UIElement)
// {
// var oldParentPaneControl = oldParent.FindVisualAncestor<LayoutAnchorablePaneControl>();
// if (oldParentPaneControl != null)
// {
// ((ILogicalChildrenContainer)oldParentPaneControl).InternalRemoveLogicalChild(contentModel.Content);
// }
// }
private void _clickGracePeriodTimer_Tick( object sender, EventArgs e )
{
StopGraceTimer();
}
// if (contentModel.Content != null && contentModel.Content is UIElement)
// {
// var oldLogicalParentPaneControl = LogicalTreeHelper.GetParent(contentModel.Content as UIElement)
// as ILogicalChildrenContainer;
// if (oldLogicalParentPaneControl != null)
// oldLogicalParentPaneControl.InternalRemoveLogicalChild(contentModel.Content);
// }
private void StopGraceTimer()
{
_clickGracePeriodTimer.Tick -= new EventHandler( _clickGracePeriodTimer_Tick );
_clickGracePeriodTimer.Stop();
_clickGracePeriodTimer = null;
_inGracePeriod = false;
}
// if (contentModel != null && contentModel.Content != null && contentModel.Root != null && contentModel.Content is UIElement)
// {
// ((ILogicalChildrenContainer)contentModel.Root.Manager).InternalAddLogicalChild(contentModel.Content);
// }
//}
#endregion
protected override void OnMouseDown( System.Windows.Input.MouseButtonEventArgs e )
#region Overrides
//protected override void OnVisualParentChanged(DependencyObject oldParent)
//{
// base.OnVisualParentChanged(oldParent);
// var contentModel = _model;
// if (oldParent != null && contentModel != null && contentModel.Content is UIElement)
// {
// var oldParentPaneControl = oldParent.FindVisualAncestor<LayoutAnchorablePaneControl>();
// if (oldParentPaneControl != null)
// {
// ((ILogicalChildrenContainer)oldParentPaneControl).InternalRemoveLogicalChild(contentModel.Content);
// }
// }
// if (contentModel.Content != null && contentModel.Content is UIElement)
// {
// var oldLogicalParentPaneControl = LogicalTreeHelper.GetParent(contentModel.Content as UIElement)
// as ILogicalChildrenContainer;
// if (oldLogicalParentPaneControl != null)
// oldLogicalParentPaneControl.InternalRemoveLogicalChild(contentModel.Content);
// }
// if (contentModel != null && contentModel.Content != null && contentModel.Root != null && contentModel.Content is UIElement)
// {
// ((ILogicalChildrenContainer)contentModel.Root.Manager).InternalAddLogicalChild(contentModel.Content);
// }
//}
protected override void OnMouseDown( System.Windows.Input.MouseButtonEventArgs e )
{
base.OnMouseDown( e );
if (!e.Handled)
{
if (_model.Root.Manager.AutoHideWindow.Visibility != Visibility.Visible)
{
_model.Root.Manager.ShowAutoHideWindow(this);
_model.IsActive = true;
_manuallyOpened = true;
}
else
{
if (!_inGracePeriod)
{
_model.Root.Manager.HideAutoHideWindow(this);
}
}
}
if( !e.Handled )
{
if( _model.Root.Manager.AutoHideWindow.Visibility != Visibility.Visible )
{
_model.Root.Manager.ShowAutoHideWindow( this );
_model.IsActive = true;
_manuallyOpened = true;
}
else
{
if( !_inGracePeriod )
{
_model.Root.Manager.HideAutoHideWindow( this );
}
}
}
}
protected override void OnMouseEnter( System.Windows.Input.MouseEventArgs e )
{
base.OnMouseEnter( e );
if (!e.Handled)
{
_openUpTimer = new DispatcherTimer(DispatcherPriority.ApplicationIdle);
_openUpTimer.Interval = TimeSpan.FromMilliseconds(400);
_openUpTimer.Tick += new EventHandler(_openUpTimer_Tick);
_openUpTimer.Start();
}
}
if( !e.Handled )
{
_openUpTimer = new DispatcherTimer( DispatcherPriority.ApplicationIdle );
_openUpTimer.Interval = TimeSpan.FromMilliseconds( 400 );
_openUpTimer.Tick += new EventHandler( _openUpTimer_Tick );
_openUpTimer.Start();
}
}
protected override void OnMouseLeave( System.Windows.Input.MouseEventArgs e )
{

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs

@ -44,7 +44,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary>
/// Model Dependency Property
/// </summary>
public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutAnchorable ), typeof( LayoutAnchorableControl ),
public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutAnchorable ), typeof( LayoutAnchorableControl ),
new FrameworkPropertyMetadata( ( LayoutAnchorable )null, new PropertyChangedCallback( OnModelChanged ) ) );
/// <summary>

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs

@ -199,10 +199,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
internal override void UpdateThemeResources( Xceed.Wpf.AvalonDock.Themes.Theme oldTheme = null )
{
if (Application.Current != null)
return;
if( Application.Current != null )
return;
base.UpdateThemeResources( oldTheme );
base.UpdateThemeResources( oldTheme );
if( _overlayWindow != null )
{

12
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs

@ -222,13 +222,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
return value;
}
private bool CanExecuteDockCommand(object parameter)
{
if (LayoutElement == null)
return false;
private bool CanExecuteDockCommand( object parameter )
{
if( LayoutElement == null )
return false;
return LayoutElement.CanDock && LayoutElement.FindParent<LayoutAnchorableFloatingWindow>() != null;
}
return LayoutElement.CanDock && LayoutElement.FindParent<LayoutAnchorableFloatingWindow>() != null;
}
private void ExecuteDockCommand( object parameter )
{

36
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs

@ -164,26 +164,26 @@ namespace Xceed.Wpf.AvalonDock.Controls
return new HandleRef( this, _internalHwndSource.Handle );
}
protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
protected override IntPtr WndProc( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled )
{
// Make sure that autohide windows always display on top of other Controls
// (even Win32 control which WPF cannot normally overlay!)
if( msg == Win32Helper.WM_WINDOWPOSCHANGING )
{
// APD Fix - Stop a recursive call to WndProc when the window has been destroyed
// It was making a call to SetWindowPos which could cause a stack overflow.
if( _internalHost_ContentRendered )
{
// Make sure that autohide windows always display on top of other Controls
// (even Win32 control which WPF cannot normally overlay!)
if (msg == Win32Helper.WM_WINDOWPOSCHANGING)
{
// APD Fix - Stop a recursive call to WndProc when the window has been destroyed
// It was making a call to SetWindowPos which could cause a stack overflow.
if (_internalHost_ContentRendered)
{
Win32Helper.WINDOWPOS mwp = (Win32Helper.WINDOWPOS)Marshal.PtrToStructure(lParam, typeof(Win32Helper.WINDOWPOS));
mwp.hwndInsertAfter = Win32Helper.HWND_TOP;
mwp.flags = mwp.flags & ~(int)Win32Helper.SetWindowPosFlags.IgnoreZOrder;
Marshal.StructureToPtr(mwp, lParam, true);
}
}
return base.WndProc(hwnd, msg, wParam, lParam, ref handled);
Win32Helper.WINDOWPOS mwp = ( Win32Helper.WINDOWPOS )Marshal.PtrToStructure( lParam, typeof( Win32Helper.WINDOWPOS ) );
mwp.hwndInsertAfter = Win32Helper.HWND_TOP;
mwp.flags = mwp.flags & ~( int )Win32Helper.SetWindowPosFlags.IgnoreZOrder;
Marshal.StructureToPtr( mwp, lParam, true );
}
}
return base.WndProc( hwnd, msg, wParam, lParam, ref handled );
}
protected override void DestroyWindowCore( System.Runtime.InteropServices.HandleRef hwnd )
{

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs

@ -115,7 +115,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// LayoutItem Read-Only Dependency Property
/// </summary>
private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( LayoutDocumentControl ),
new FrameworkPropertyMetadata(( LayoutItem )null ) );
new FrameworkPropertyMetadata( ( LayoutItem )null ) );
public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty;

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs

@ -97,7 +97,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnVisibilityChanged()
{
if( (_document != null) && (_document.Root != null) )
if( ( _document != null ) && ( _document.Root != null ) )
{
_document.IsVisible = ( this.Visibility == Visibility.Visible );
@ -138,6 +138,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion
#endregion
}
}

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs

@ -57,7 +57,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary>
/// Model Dependency Property
/// </summary>
public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutContent ), typeof( LayoutDocumentTabItem ),
public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutContent ), typeof( LayoutDocumentTabItem ),
new FrameworkPropertyMetadata( ( LayoutContent )null, new PropertyChangedCallback( OnModelChanged ) ) );
/// <summary>

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs

@ -245,10 +245,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
internal virtual void UpdateThemeResources( Theme oldTheme = null )
{
if (Application.Current != null)
return;
if( Application.Current != null )
return;
if ( oldTheme != null )
if( oldTheme != null )
{
if( oldTheme is DictionaryTheme )
{

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs

@ -67,7 +67,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
return _model;
}
}
}
public Orientation Orientation
{
@ -75,7 +75,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
return ( _model as ILayoutOrientableGroup ).Orientation;
}
}
}
private bool AsyncRefreshCalled
{
@ -565,7 +565,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
_resizerWindowHost.Show();
}
private void HideResizerOverlayWindow()
private void HideResizerOverlayWindow()
{
if( _resizerWindowHost != null )
{

70
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs

@ -424,42 +424,42 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion
#region CanDock
#region CanDock
public static readonly DependencyProperty CanDockProperty =
DependencyProperty.Register("CanDock", typeof(bool), typeof(LayoutItem),
new FrameworkPropertyMetadata(true,
new PropertyChangedCallback(OnCanDockChanged)));
public static readonly DependencyProperty CanDockProperty =
DependencyProperty.Register( "CanDock", typeof( bool ), typeof( LayoutItem ),
new FrameworkPropertyMetadata( true,
new PropertyChangedCallback( OnCanDockChanged ) ) );
public bool CanDock
{
get { return (bool)GetValue(CanDockProperty); }
set { SetValue(CanDockProperty, value); }
}
public bool CanDock
{
get { return ( bool )GetValue( CanDockProperty ); }
set { SetValue( CanDockProperty, value ); }
}
private static void OnCanDockChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
((LayoutItem)d).OnCanDockChanged(e);
}
private static void OnCanDockChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
{
( ( LayoutItem )d ).OnCanDockChanged( e );
}
protected virtual void OnCanDockChanged(DependencyPropertyChangedEventArgs e)
{
LayoutElement.CanDock = (bool)e.NewValue;
}
protected virtual void OnCanDockChanged( DependencyPropertyChangedEventArgs e )
{
LayoutElement.CanDock = ( bool )e.NewValue;
}
#endregion
#endregion
#endregion
#endregion
#region Commands
#region Commands
#region CloseCommand
#region CloseCommand
/// <summary>
/// CloseCommand Dependency Property
/// </summary>
public static readonly DependencyProperty CloseCommandProperty = DependencyProperty.Register( "CloseCommand", typeof( ICommand ), typeof( LayoutItem ),
new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnCloseCommandChanged ), new CoerceValueCallback( CoerceCloseCommandValue ) ) );
/// <summary>
/// CloseCommand Dependency Property
/// </summary>
public static readonly DependencyProperty CloseCommandProperty = DependencyProperty.Register( "CloseCommand", typeof( ICommand ), typeof( LayoutItem ),
new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnCloseCommandChanged ), new CoerceValueCallback( CoerceCloseCommandValue ) ) );
/// <summary>
/// Gets or sets the CloseCommand property. This dependency property
@ -627,10 +627,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
return value;
}
private bool CanExecuteDockAsDocumentCommand(object parameter)
{
return LayoutElement != null && LayoutElement.CanDock && LayoutElement.FindParent<LayoutDocumentPane>() == null;
}
private bool CanExecuteDockAsDocumentCommand( object parameter )
{
return LayoutElement != null && LayoutElement.CanDock && LayoutElement.FindParent<LayoutDocumentPane>() == null;
}
private void ExecuteDockAsDocumentCommand( object parameter )
{
@ -1109,13 +1109,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
layoutElement.IsActive = true;
layoutElement.Root.CollectGarbage();
}
#endregion
#endregion
#endregion
#endregion
#region Internal Methods
#region Internal Methods
protected virtual void InitDefaultCommands()
protected virtual void InitDefaultCommands()
{
_defaultCloseCommand = new RelayCommand( ( p ) => ExecuteCloseCommand( p ), ( p ) => CanExecuteCloseCommand( p ) );
_defaultFloatCommand = new RelayCommand( ( p ) => ExecuteFloatCommand( p ), ( p ) => CanExecuteFloatCommand( p ) );

16
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs

@ -249,7 +249,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
bool shouldHandle = false;
// Press Tab to switch Selected LayoutContent.
if( e.Key == System.Windows.Input.Key.Tab)
if( e.Key == System.Windows.Input.Key.Tab )
{
// Selecting LayoutDocuments
if( _isSelectingDocument )
@ -258,7 +258,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
// Jump to next LayoutDocument
var docIndex = this.Documents.IndexOf<LayoutDocumentItem>( this.SelectedDocument );
if( docIndex < (this.Documents.Length - 1) )
if( docIndex < ( this.Documents.Length - 1 ) )
{
this.SelectNextDocument();
shouldHandle = true;
@ -289,7 +289,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
// Jump to next LayoutAnchorable
var anchorableIndex = this.Anchorables.ToArray().IndexOf<LayoutAnchorableItem>( this.SelectedAnchorable );
if( anchorableIndex < (this.Anchorables.Count() - 1) )
if( anchorableIndex < ( this.Anchorables.Count() - 1 ) )
{
this.SelectNextAnchorable();
shouldHandle = true;
@ -374,10 +374,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
internal void UpdateThemeResources( Theme oldTheme = null )
{
if (Application.Current != null)
return;
if( Application.Current != null )
return;
if ( oldTheme != null )
if( oldTheme != null )
{
if( oldTheme is DictionaryTheme )
{
@ -472,11 +472,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
this.Loaded -= new RoutedEventHandler( OnLoaded );
if( ( _documentListBox != null ) && (this.SelectedDocument != null) )
if( ( _documentListBox != null ) && ( this.SelectedDocument != null ) )
{
_documentListBox.Focus();
}
else if( ( _anchorableListBox != null ) && (this.SelectedAnchorable != null) )
else if( ( _anchorableListBox != null ) && ( this.SelectedAnchorable != null ) )
{
_anchorableListBox.Focus();
}

114
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs

@ -151,10 +151,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
internal void UpdateThemeResources( Theme oldTheme = null )
{
if (Application.Current != null)
return;
if( Application.Current != null )
return;
if ( oldTheme != null )
if( oldTheme != null )
{
if( oldTheme is DictionaryTheme )
{
@ -518,25 +518,25 @@ namespace Xceed.Wpf.AvalonDock.Controls
var layoutDocumentPane = ( dropAreaDocumentPaneGroup.AreaElement.Model as LayoutDocumentPaneGroup ).Children.First() as LayoutDocumentPane;
var parentDocumentPaneGroup = layoutDocumentPane.Parent as LayoutDocumentPaneGroup;
_documentPaneDropTargetLeft.Visibility = Visibility.Hidden;
_documentPaneDropTargetRight.Visibility = Visibility.Hidden;
_documentPaneDropTargetTop.Visibility = Visibility.Hidden;
_documentPaneDropTargetBottom.Visibility = Visibility.Hidden;
}
break;
case DropAreaType.DocumentPane:
default:
{
bool isDraggingAnchorables = false;
if (_floatingWindow != null)
isDraggingAnchorables = _floatingWindow.Model is LayoutAnchorableFloatingWindow;
if (isDraggingAnchorables && _gridDocumentPaneFullDropTargets != null)
{
areaElement = _gridDocumentPaneFullDropTargets;
var dropAreaDocumentPaneGroup = area as DropArea<LayoutDocumentPaneControl>;
var layoutDocumentPane = dropAreaDocumentPaneGroup.AreaElement.Model as LayoutDocumentPane;
var parentDocumentPaneGroup = layoutDocumentPane.Parent as LayoutDocumentPaneGroup;
_documentPaneDropTargetLeft.Visibility = Visibility.Hidden;
_documentPaneDropTargetRight.Visibility = Visibility.Hidden;
_documentPaneDropTargetTop.Visibility = Visibility.Hidden;
_documentPaneDropTargetBottom.Visibility = Visibility.Hidden;
}
break;
case DropAreaType.DocumentPane:
default:
{
bool isDraggingAnchorables = false;
if( _floatingWindow != null )
isDraggingAnchorables = _floatingWindow.Model is LayoutAnchorableFloatingWindow;
if( isDraggingAnchorables && _gridDocumentPaneFullDropTargets != null )
{
areaElement = _gridDocumentPaneFullDropTargets;
var dropAreaDocumentPaneGroup = area as DropArea<LayoutDocumentPaneControl>;
var layoutDocumentPane = dropAreaDocumentPaneGroup.AreaElement.Model as LayoutDocumentPane;
var parentDocumentPaneGroup = layoutDocumentPane.Parent as LayoutDocumentPaneGroup;
SetDropTargetIntoVisibility( layoutDocumentPane );
@ -672,46 +672,46 @@ namespace Xceed.Wpf.AvalonDock.Controls
break;
}
if (areaElement != null)
{
Canvas.SetLeft(areaElement, area.DetectionRect.Left - Left);
Canvas.SetTop(areaElement, area.DetectionRect.Top - Top);
areaElement.Width = area.DetectionRect.Width;
areaElement.Height = area.DetectionRect.Height;
areaElement.Visibility = System.Windows.Visibility.Visible;
}
}
if( areaElement != null )
{
Canvas.SetLeft( areaElement, area.DetectionRect.Left - Left );
Canvas.SetTop( areaElement, area.DetectionRect.Top - Top );
areaElement.Width = area.DetectionRect.Width;
areaElement.Height = area.DetectionRect.Height;
areaElement.Visibility = System.Windows.Visibility.Visible;
}
}
void IOverlayWindow.DragLeave( IDropArea area )
{
_visibleAreas.Remove( area );
FrameworkElement areaElement;
switch (area.Type)
{
case DropAreaType.DockingManager:
areaElement = _gridDockingManagerDropTargets;
break;
case DropAreaType.AnchorablePane:
areaElement = _gridAnchorablePaneDropTargets;
break;
case DropAreaType.DocumentPaneGroup:
areaElement = _gridDocumentPaneDropTargets;
break;
case DropAreaType.DocumentPane:
default:
{
bool isDraggingAnchorables = false;
if (_floatingWindow != null)
isDraggingAnchorables = _floatingWindow.Model is LayoutAnchorableFloatingWindow;
if (isDraggingAnchorables && _gridDocumentPaneFullDropTargets != null)
areaElement = _gridDocumentPaneFullDropTargets;
else
areaElement = _gridDocumentPaneDropTargets;
}
break;
}
FrameworkElement areaElement;
switch( area.Type )
{
case DropAreaType.DockingManager:
areaElement = _gridDockingManagerDropTargets;
break;
case DropAreaType.AnchorablePane:
areaElement = _gridAnchorablePaneDropTargets;
break;
case DropAreaType.DocumentPaneGroup:
areaElement = _gridDocumentPaneDropTargets;
break;
case DropAreaType.DocumentPane:
default:
{
bool isDraggingAnchorables = false;
if( _floatingWindow != null )
isDraggingAnchorables = _floatingWindow.Model is LayoutAnchorableFloatingWindow;
if( isDraggingAnchorables && _gridDocumentPaneFullDropTargets != null )
areaElement = _gridDocumentPaneFullDropTargets;
else
areaElement = _gridDocumentPaneDropTargets;
}
break;
}
areaElement.Visibility = System.Windows.Visibility.Hidden;
}

72
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs

@ -52,7 +52,7 @@ namespace Xceed.Wpf.AvalonDock
private NavigatorWindow _navigatorWindow = null;
internal bool SuspendDocumentsSourceBinding = false;
internal bool SuspendAnchorablesSourceBinding = false;
internal bool SuspendAnchorablesSourceBinding = false;
#endregion
@ -156,8 +156,8 @@ namespace Xceed.Wpf.AvalonDock
ClearLogicalChildrenList();
DetachLayoutItems();
ActiveContent = null;
Layout.Manager = this;
ActiveContent = null;
Layout.Manager = this;
AttachLayoutItems();
AttachDocumentsSource( newLayout, DocumentsSource );
@ -200,15 +200,15 @@ namespace Xceed.Wpf.AvalonDock
CommandManager.InvalidateRequerySuggested();
}
#endregion
#endregion
#region LayoutUpdateStrategy
#region LayoutUpdateStrategy
/// <summary>
/// LayoutUpdateStrategy Dependency Property
/// </summary>
public static readonly DependencyProperty LayoutUpdateStrategyProperty = DependencyProperty.Register( "LayoutUpdateStrategy", typeof( ILayoutUpdateStrategy ), typeof( DockingManager ),
new FrameworkPropertyMetadata( ( ILayoutUpdateStrategy )null ) );
/// <summary>
/// LayoutUpdateStrategy Dependency Property
/// </summary>
public static readonly DependencyProperty LayoutUpdateStrategyProperty = DependencyProperty.Register( "LayoutUpdateStrategy", typeof( ILayoutUpdateStrategy ), typeof( DockingManager ),
new FrameworkPropertyMetadata( ( ILayoutUpdateStrategy )null ) );
/// <summary>
/// Gets or sets the LayoutUpdateStrategy property. This dependency property
@ -1131,10 +1131,10 @@ namespace Xceed.Wpf.AvalonDock
if( _logicalChildren.Select( ch => ch.GetValueOrDefault<object>() ).Contains( element ) )
return;
if (((FrameworkElement)element).Parent != null)
{
(((FrameworkElement)element).Parent as DockingManager).InternalRemoveLogicalChild(element);
}
if( ( ( FrameworkElement )element ).Parent != null )
{
( ( ( FrameworkElement )element ).Parent as DockingManager ).InternalRemoveLogicalChild( element );
}
_logicalChildren.Add( new WeakReference( element ) );
AddLogicalChild( element );
@ -1528,8 +1528,8 @@ namespace Xceed.Wpf.AvalonDock
{
var oldTheme = e.OldValue as Theme;
var newTheme = e.NewValue as Theme;
var resources = Application.Current == null ? this.Resources : Application.Current.Resources;
if ( oldTheme != null )
var resources = Application.Current == null ? this.Resources : Application.Current.Resources;
if( oldTheme != null )
{
if( oldTheme is DictionaryTheme )
{
@ -1562,17 +1562,17 @@ namespace Xceed.Wpf.AvalonDock
}
}
if (Application.Current == null)
{
foreach (var fwc in _fwList)
fwc.UpdateThemeResources(oldTheme);
if( Application.Current == null )
{
foreach( var fwc in _fwList )
fwc.UpdateThemeResources( oldTheme );
if (_navigatorWindow != null)
_navigatorWindow.UpdateThemeResources();
if( _navigatorWindow != null )
_navigatorWindow.UpdateThemeResources();
if (_overlayWindow != null)
_overlayWindow.UpdateThemeResources();
}
if( _overlayWindow != null )
_overlayWindow.UpdateThemeResources();
}
}
#endregion
@ -1937,11 +1937,11 @@ namespace Xceed.Wpf.AvalonDock
}
}
#endregion
#endregion
#region Overrides
#region Overrides
public override void OnApplyTemplate()
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
@ -3253,8 +3253,8 @@ namespace Xceed.Wpf.AvalonDock
bool IOverlayWindowHost.HitTest( Point dragPoint )
{
if (!this.IsVisible) return false;
Rect detectionRect = new Rect( this.PointToScreenDPIWithoutFlowDirection( new Point() ), this.TransformActualSizeToAncestor() );
if( !this.IsVisible ) return false;
Rect detectionRect = new Rect( this.PointToScreenDPIWithoutFlowDirection( new Point() ), this.TransformActualSizeToAncestor() );
return detectionRect.Contains( dragPoint );
}
@ -3269,12 +3269,12 @@ namespace Xceed.Wpf.AvalonDock
IOverlayWindow IOverlayWindowHost.ShowOverlayWindow( LayoutFloatingWindowControl draggingWindow )
{
CreateOverlayWindow();
if (draggingWindow.Model.Root.ActiveContent.CanDock)
{
_overlayWindow.Owner = draggingWindow;
_overlayWindow.EnableDropTargets();
_overlayWindow.Show();
}
if( draggingWindow.Model.Root.ActiveContent.CanDock )
{
_overlayWindow.Owner = draggingWindow;
_overlayWindow.EnableDropTargets();
_overlayWindow.Show();
}
return _overlayWindow;
}

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/Extentions.cs

@ -96,7 +96,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
layoutPanel = parentContainer.FindParent<LayoutPanel>();
}
if( (layoutPanel != null) && ( layoutPanel.Children.Count > 0 ) )
if( ( layoutPanel != null ) && ( layoutPanel.Children.Count > 0 ) )
{
if( layoutPanel.Orientation == System.Windows.Controls.Orientation.Horizontal )
return layoutPanel.Children[ 0 ].Descendents().Contains( element ) ? AnchorSide.Left : AnchorSide.Right;

10
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs

@ -355,11 +355,11 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "Anchorable()" );
}
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "Anchorable()" );
}
#endif
#endregion

12
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorableFloatingWindow.cs

@ -228,13 +228,13 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "FloatingAnchorableWindow()" );
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "FloatingAnchorableWindow()" );
RootPanel.ConsoleDump(tab + 1);
}
RootPanel.ConsoleDump( tab + 1 );
}
#endif
#endregion

14
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePane.cs

@ -232,14 +232,14 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "AnchorablePane()" );
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "AnchorablePane()" );
foreach (LayoutElement child in Children)
child.ConsoleDump(tab + 1);
}
foreach( LayoutElement child in Children )
child.ConsoleDump( tab + 1 );
}
#endif
#endregion

14
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePaneGroup.cs

@ -115,14 +115,14 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( string.Format( "AnchorablePaneGroup({0})", Orientation ) );
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( string.Format( "AnchorablePaneGroup({0})", Orientation ) );
foreach (LayoutElement child in Children)
child.ConsoleDump(tab + 1);
}
foreach( LayoutElement child in Children )
child.ConsoleDump( tab + 1 );
}
#endif
#endregion

82
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutContent.cs

@ -42,7 +42,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
#region Title
public static readonly DependencyProperty TitleProperty = DependencyProperty.Register( "Title", typeof( string ), typeof( LayoutContent ), new UIPropertyMetadata( null, OnTitlePropertyChanged, CoerceTitleValue ) );
public static readonly DependencyProperty TitleProperty = DependencyProperty.Register( "Title", typeof( string ), typeof( LayoutContent ), new UIPropertyMetadata( null, OnTitlePropertyChanged, CoerceTitleValue ) );
public string Title
{
@ -539,29 +539,29 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
}
#endregion
#endregion
#region CanDock
#region CanDock
private bool _canDock = true;
public bool CanDock
{
get { return _canDock; }
set
{
if (_canDock != value)
{
_canDock = value;
RaisePropertyChanged("CanDock");
}
}
}
private bool _canDock = true;
public bool CanDock
{
get { return _canDock; }
set
{
if( _canDock != value )
{
_canDock = value;
RaisePropertyChanged( "CanDock" );
}
}
}
#endregion
#endregion
#region IsEnabled
#region IsEnabled
private bool _isEnabled = true;
private bool _isEnabled = true;
public bool IsEnabled
{
get
@ -578,7 +578,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
}
#endregion
#endregion
@ -586,11 +586,11 @@ namespace Xceed.Wpf.AvalonDock.Layout
#endregion
#endregion
#region Overrides
#region Overrides
protected override void OnParentChanging( ILayoutContainer oldValue, ILayoutContainer newValue )
protected override void OnParentChanging( ILayoutContainer oldValue, ILayoutContainer newValue )
{
var root = Root;
@ -789,22 +789,22 @@ namespace Xceed.Wpf.AvalonDock.Layout
return;
}
LayoutDocumentPane newParentPane;
if (root.LastFocusedDocument != null)
{
newParentPane = root.LastFocusedDocument.Parent as LayoutDocumentPane;
LayoutDocumentPane newParentPane;
if( root.LastFocusedDocument != null )
{
newParentPane = root.LastFocusedDocument.Parent as LayoutDocumentPane;
// LastFocusedDocument's parent isn't always a DocumentPane for some reason.
// Attempt to find one when this happens.
if (newParentPane == null)
{
newParentPane = root.Descendents().OfType<LayoutDocumentPane>().FirstOrDefault();
}
}
else
{
newParentPane = root.Descendents().OfType<LayoutDocumentPane>().FirstOrDefault();
}
// LastFocusedDocument's parent isn't always a DocumentPane for some reason.
// Attempt to find one when this happens.
if( newParentPane == null )
{
newParentPane = root.Descendents().OfType<LayoutDocumentPane>().FirstOrDefault();
}
}
else
{
newParentPane = root.Descendents().OfType<LayoutDocumentPane>().FirstOrDefault();
}
if( newParentPane != null )
{
@ -886,10 +886,10 @@ namespace Xceed.Wpf.AvalonDock.Layout
var parentAsContainer = Parent as ILayoutContainer;
parentAsContainer.RemoveChild( this );
if (Content is IDisposable contentAsDisposable)
contentAsDisposable.Dispose();
if( Content is IDisposable contentAsDisposable )
contentAsDisposable.Dispose();
if ( root != null )
if( root != null )
root.CollectGarbage();
OnClosed();

10
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocument.cs

@ -98,11 +98,11 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "Document()" );
}
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "Document()" );
}
#endif
protected override void InternalDock()

12
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentFloatingWindow.cs

@ -154,13 +154,13 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "FloatingDocumentWindow()" );
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "FloatingDocumentWindow()" );
RootDocument.ConsoleDump(tab + 1);
}
RootDocument.ConsoleDump( tab + 1 );
}
#endif
#endregion

14
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs

@ -200,14 +200,14 @@ namespace Xceed.Wpf.AvalonDock.Layout
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "DocumentPane()" );
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "DocumentPane()" );
foreach (LayoutElement child in Children)
child.ConsoleDump(tab + 1);
}
foreach( LayoutElement child in Children )
child.ConsoleDump( tab + 1 );
}
#endif
#endregion

14
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPaneGroup.cs

@ -84,14 +84,14 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( string.Format( "DocumentPaneGroup({0})", Orientation ) );
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( string.Format( "DocumentPaneGroup({0})", Orientation ) );
foreach (LayoutElement child in Children)
child.ConsoleDump(tab + 1);
}
foreach( LayoutElement child in Children )
child.ConsoleDump( tab + 1 );
}
#endif
#endregion

10
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutElement.cs

@ -102,11 +102,11 @@ namespace Xceed.Wpf.AvalonDock.Layout
#region Public Methods
#if TRACE
public virtual void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new String( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( this.ToString() );
}
public virtual void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new String( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( this.ToString() );
}
#endif
#endregion

14
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPanel.cs

@ -85,14 +85,14 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( string.Format( "Panel({0})", Orientation ) );
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( string.Format( "Panel({0})", Orientation ) );
foreach (LayoutElement child in Children)
child.ConsoleDump(tab + 1);
}
foreach( LayoutElement child in Children )
child.ConsoleDump( tab + 1 );
}
#endif
#endregion

32
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutRoot.cs

@ -351,25 +351,25 @@ namespace Xceed.Wpf.AvalonDock.Layout
#region Overrides
#if TRACE
public override void ConsoleDump(int tab)
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "RootPanel()" );
public override void ConsoleDump( int tab )
{
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "RootPanel()" );
RootPanel.ConsoleDump(tab + 1);
RootPanel.ConsoleDump( tab + 1 );
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "FloatingWindows()" );
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "FloatingWindows()" );
foreach (LayoutFloatingWindow fw in FloatingWindows)
fw.ConsoleDump(tab + 1);
foreach( LayoutFloatingWindow fw in FloatingWindows )
fw.ConsoleDump( tab + 1 );
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "Hidden()" );
System.Diagnostics.Trace.Write( new string( ' ', tab * 4 ) );
System.Diagnostics.Trace.WriteLine( "Hidden()" );
foreach (LayoutAnchorable hidden in Hidden)
hidden.ConsoleDump(tab + 1);
}
foreach( LayoutAnchorable hidden in Hidden )
hidden.ConsoleDump( tab + 1 );
}
#endif
#endregion
@ -607,7 +607,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
System.Diagnostics.Debug.Assert(
!this.Descendents().OfType<LayoutAnchorablePane>().Any( a => a.ChildrenCount == 0 && a.IsVisible ) );
#if TRACE
RootPanel.ConsoleDump(4);
RootPanel.ConsoleDump( 4 );
#endif
#endif
}
@ -906,7 +906,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
if( reader.LocalName.Equals( "RootPanel" ) )
{
orientation = (reader.GetAttribute( "Orientation" ) == "Vertical") ? Orientation.Vertical : Orientation.Horizontal;
orientation = ( reader.GetAttribute( "Orientation" ) == "Vertical" ) ? Orientation.Vertical : Orientation.Horizontal;
reader.Read();
while( true )

10
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Properties/AssemblyInfo.cs

@ -38,7 +38,7 @@ using System;
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
[assembly: ComVisible( false )]
[assembly: CLSCompliant( true )]
//In order to begin building localizable applications, set
@ -53,11 +53,11 @@ using System;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
[assembly: XmlnsPrefix( "http://schemas.xceed.com/wpf/xaml/avalondock", "xcad" )]

Loading…
Cancel
Save