diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs index a4c5c481..9c5a327d 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs @@ -52,7 +52,7 @@ namespace Xceed.Wpf.AvalonDock.Controls /// /// Model Dependency Property /// - 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 ) ) ); /// @@ -98,10 +98,10 @@ namespace Xceed.Wpf.AvalonDock.Controls /// /// LayoutItem Read-Only Dependency Property /// - 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; /// /// Gets the LayoutItem property. This dependency property diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneControlOverlayArea.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneControlOverlayArea.cs index 6f427b03..149bf403 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneControlOverlayArea.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DragService.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DragService.cs index cec01131..a411a4ba 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DragService.cs +++ b/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 _overlayWindowHosts = new List(); - private IOverlayWindowHost _currentHost; - private IOverlayWindow _currentWindow; - private List _currentWindowAreas = new List(); - 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 areasToRemove = new List(); - _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 _overlayWindowHosts = new List(); + private IOverlayWindowHost _currentHost; + private IOverlayWindow _currentWindow; + private List _currentWindowAreas = new List(); + 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 areasToRemove = new List(); + _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().Where(fw => fw != _floatingWindow && fw.IsVisible)); - _overlayWindowHosts.Add(_manager); - } + private void GetOverlayWindowHosts() + { + _overlayWindowHosts.AddRange( _manager.GetFloatingWindowsByZOrder().OfType().Where( fw => fw != _floatingWindow && fw.IsVisible ) ); + _overlayWindowHosts.Add( _manager ); + } - #endregion - } + #endregion + } } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs index e4ae9a12..ecb179a3 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs @@ -38,8 +38,8 @@ namespace Xceed.Wpf.AvalonDock.Controls /// /// DropDownContextMenu Dependency Property /// - 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 ) ) ); /// /// Gets or sets the DropDownContextMenu property. This dependency property @@ -82,7 +82,7 @@ namespace Xceed.Wpf.AvalonDock.Controls /// /// DropDownContextMenuDataContext Dependency Property /// - 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 ) ); /// diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorControl.cs index 5b318242..78783ad8 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorControl.cs +++ b/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(); - // 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(); + // 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 ) { diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs index 80ebc8b8..9698d976 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs @@ -44,7 +44,7 @@ namespace Xceed.Wpf.AvalonDock.Controls /// /// Model Dependency Property /// - 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 ) ) ); /// diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs index 9df3da5e..152cd5e9 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs +++ b/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 ) { diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs index 7a8a6047..ef1895fd 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs +++ b/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() != null; - } + return LayoutElement.CanDock && LayoutElement.FindParent() != null; + } private void ExecuteDockCommand( object parameter ) { diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs index f3004fb7..1853246d 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs +++ b/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 ) { diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs index b2e4a37f..e3c96687 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs @@ -115,7 +115,7 @@ namespace Xceed.Wpf.AvalonDock.Controls /// LayoutItem Read-Only Dependency Property /// 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; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs index 7bcbba96..f5b5a083 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs +++ b/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 } } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs index 951d2c1e..8c9aca9b 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs @@ -57,7 +57,7 @@ namespace Xceed.Wpf.AvalonDock.Controls /// /// Model Dependency Property /// - 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 ) ) ); /// diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs index f77c3590..bb5dcf3c 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs +++ b/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 ) { diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs index 0f8960d6..6ca2597f 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs +++ b/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 ) { diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs index 236d9e90..4f5d6d37 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs +++ b/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 - /// - /// CloseCommand Dependency Property - /// - public static readonly DependencyProperty CloseCommandProperty = DependencyProperty.Register( "CloseCommand", typeof( ICommand ), typeof( LayoutItem ), - new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnCloseCommandChanged ), new CoerceValueCallback( CoerceCloseCommandValue ) ) ); + /// + /// CloseCommand Dependency Property + /// + public static readonly DependencyProperty CloseCommandProperty = DependencyProperty.Register( "CloseCommand", typeof( ICommand ), typeof( LayoutItem ), + new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnCloseCommandChanged ), new CoerceValueCallback( CoerceCloseCommandValue ) ) ); /// /// 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() == null; - } + private bool CanExecuteDockAsDocumentCommand( object parameter ) + { + return LayoutElement != null && LayoutElement.CanDock && LayoutElement.FindParent() == 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 ) ); diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs index a0a7f461..3cac7398 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs +++ b/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( 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( 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(); } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs index edf631f5..dd1770b2 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs +++ b/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; - 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; + 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; } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs index 2d91dddc..f1215f1d 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs +++ b/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 - /// - /// LayoutUpdateStrategy Dependency Property - /// - public static readonly DependencyProperty LayoutUpdateStrategyProperty = DependencyProperty.Register( "LayoutUpdateStrategy", typeof( ILayoutUpdateStrategy ), typeof( DockingManager ), - new FrameworkPropertyMetadata( ( ILayoutUpdateStrategy )null ) ); + /// + /// LayoutUpdateStrategy Dependency Property + /// + public static readonly DependencyProperty LayoutUpdateStrategyProperty = DependencyProperty.Register( "LayoutUpdateStrategy", typeof( ILayoutUpdateStrategy ), typeof( DockingManager ), + new FrameworkPropertyMetadata( ( ILayoutUpdateStrategy )null ) ); /// /// Gets or sets the LayoutUpdateStrategy property. This dependency property @@ -1131,10 +1131,10 @@ namespace Xceed.Wpf.AvalonDock if( _logicalChildren.Select( ch => ch.GetValueOrDefault() ).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; } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/Extentions.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/Extentions.cs index ce491425..18114f48 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/Extentions.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/Extentions.cs @@ -96,7 +96,7 @@ namespace Xceed.Wpf.AvalonDock.Layout layoutPanel = parentContainer.FindParent(); } - 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; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs index 4502e764..797ee9cc 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorableFloatingWindow.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorableFloatingWindow.cs index 2dc51092..2c7e804f 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorableFloatingWindow.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePane.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePane.cs index abb9ef29..5587b735 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePane.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePaneGroup.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePaneGroup.cs index f00808f0..9be12c72 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorablePaneGroup.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutContent.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutContent.cs index 65d8c74f..5246f879 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutContent.cs +++ b/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().FirstOrDefault(); - } - } - else - { - newParentPane = root.Descendents().OfType().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().FirstOrDefault(); + } + } + else + { + newParentPane = root.Descendents().OfType().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(); diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocument.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocument.cs index 07d4b075..bce826c2 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocument.cs +++ b/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() diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentFloatingWindow.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentFloatingWindow.cs index aa71ef3a..ee682c3d 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentFloatingWindow.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs index 35589ba8..5010b95a 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPaneGroup.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPaneGroup.cs index 495c7a96..f66ef724 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPaneGroup.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutElement.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutElement.cs index e3965f1b..a11ab3dd 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutElement.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPanel.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPanel.cs index 5d9c36b1..0d9627ff 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPanel.cs +++ b/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 diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutRoot.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutRoot.cs index f2fa1de9..ff4a8302 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutRoot.cs +++ b/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().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 ) diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Properties/AssemblyInfo.cs index 3800cc83..9d9892fe 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Properties/AssemblyInfo.cs +++ b/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" )]