From e3122b7e41a5a68a3529f52bc86420b73d3ce9fc Mon Sep 17 00:00:00 2001 From: BoucherS_cp Date: Fri, 6 May 2016 13:27:23 +0000 Subject: [PATCH] --- .../AssemblyVersionInfo.cs | 2 +- .../Theme.xaml | 3 +- .../AssemblyVersionInfo.cs | 2 +- .../Theme.xaml | 3 +- .../AssemblyVersionInfo.cs | 2 +- .../Theme.xaml | 3 +- .../AssemblyVersionInfo.cs | 2 +- .../Controls/LayoutAnchorableItem.cs | 5 +- .../Controls/LayoutDocumentItem.cs | 5 +- .../Controls/LayoutFloatingWindowControl.cs | 37 ++- .../Controls/Shell/WindowChromeWorker.cs | 35 +- .../Xceed.Wpf.AvalonDock/DockingManager.cs | 17 +- .../Layout/LayoutAnchorable.cs | 4 + .../Layout/LayoutDocumentPane.cs | 309 ++++++++++-------- .../Layout/LayoutPositionableGroup.cs | 4 +- .../Xceed.Wpf.AvalonDock/Themes/generic.xaml | 5 +- .../Xceed.Wpf.DataGrid/AssemblyVersionInfo.cs | 2 +- .../Utils/Wpf/TreeHelper.cs | 6 +- .../MainWindow.xaml | 1 - .../Properties/AssemblyInfo.cs | 4 +- .../Properties/Resources.resx | 10 +- .../NorthwindDataService/Reference.datasvcmap | 4 +- .../Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs | 2 +- .../Implementation/BusyIndicator.cs | 1 - .../Themes/Aero2.NormalColor.xaml | 1 + .../CheckComboBox/Themes/Generic.xaml | 1 + .../Core/Utilities/CalculatorUtilities.cs | 2 + .../Implementation/DateTimeParser.cs | 6 +- .../Implementation/DateTimeUpDown.cs | 20 +- .../Implementation/DropDownButton.cs | 17 +- .../Implementation/MaskedTextBox.cs | 4 +- .../TranslateSelectedTabItemConverter.cs | 59 ---- .../Implementation/CommonNumericUpDown.cs | 17 +- .../Xceed.Wpf.Toolkit/Primitives/Selector.cs | 7 +- .../DescriptorPropertyDefinition.cs | 4 +- .../Editors/CollectionEditor.cs | 11 +- .../Implementation/PropertyGrid.cs | 8 +- .../Themes/Aero2.NormalColor.xaml | 4 +- .../PropertyGrid/Themes/Generic.xaml | 2 + .../RichTextBoxFormatBar.cs | 2 +- .../TimePicker/Implementation/TimePicker.cs | 4 +- .../Xceed.Wpf.Toolkit.csproj | 1 - .../Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs | 40 +-- .../Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs | 2 +- .../Implementation/BusyIndicator.cs | 1 - .../BusyIndicator/Themes/Generic.xaml | 18 +- .../Themes/Aero2.NormalColor.xaml | 1 + .../CheckComboBox/Themes/Generic.xaml | 1 + .../Core/Utilities/CalculatorUtilities.cs | 2 + .../Core/VersionResourceDictionary.cs | 4 +- .../Implementation/DateTimeParser.cs | 6 +- .../Implementation/DateTimeUpDown.cs | 20 +- .../Implementation/DropDownButton.cs | 17 +- .../Implementation/MaskedTextBox.cs | 4 +- .../Implementation/CommonNumericUpDown.cs | 17 +- .../Xceed.Wpf.Toolkit/Primitives/Selector.cs | 7 +- .../DescriptorPropertyDefinition.cs | 4 +- .../Editors/CollectionEditor.cs | 11 +- .../Implementation/PropertyGrid.cs | 8 +- .../Themes/Aero2.NormalColor.xaml | 4 +- .../PropertyGrid/Themes/Generic.xaml | 2 + .../RichTextBoxFormatBar.cs | 2 +- .../TimePicker/Implementation/TimePicker.cs | 4 +- .../Xceed.Wpf.Toolkit.csproj | 5 +- .../Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs | 40 +-- 65 files changed, 471 insertions(+), 387 deletions(-) delete mode 100644 ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaterialControls/MaterialTabs/Implementation/Converters/TranslateSelectedTabItemConverter.cs diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs index a2dee8ce..243365ac 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs @@ -21,7 +21,7 @@ internal static class _XceedVersionInfo { [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] - public const string BaseVersion = "2.7"; + public const string BaseVersion = "2.8"; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] public const string Version = BaseVersion + ".0.0"; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml index 2070ed88..fa0eaae1 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml @@ -55,7 +55,8 @@ - + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs index a2dee8ce..243365ac 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs @@ -21,7 +21,7 @@ internal static class _XceedVersionInfo { [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] - public const string BaseVersion = "2.7"; + public const string BaseVersion = "2.8"; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] public const string Version = BaseVersion + ".0.0"; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml index 582419cf..12f9b5aa 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml @@ -87,7 +87,8 @@ - + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs index a2dee8ce..243365ac 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs @@ -21,7 +21,7 @@ internal static class _XceedVersionInfo { [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] - public const string BaseVersion = "2.7"; + public const string BaseVersion = "2.8"; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] public const string Version = BaseVersion + ".0.0"; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml index 98d14e73..d667455c 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml @@ -109,7 +109,8 @@ - + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs index a2dee8ce..243365ac 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs @@ -21,7 +21,7 @@ internal static class _XceedVersionInfo { [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] - public const string BaseVersion = "2.7"; + public const string BaseVersion = "2.8"; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] public const string Version = BaseVersion + ".0.0"; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs index 4a1a34d3..b94e03c7 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs @@ -51,8 +51,11 @@ namespace Xceed.Wpf.AvalonDock.Controls protected override void Close() { + if( (_anchorable.Root != null) && (_anchorable.Root.Manager != null) ) + { var dockingManager = _anchorable.Root.Manager; - dockingManager._ExecuteCloseCommand(_anchorable); + dockingManager._ExecuteCloseCommand( _anchorable ); + } } ICommand _defaultHideCommand; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs index 142426f0..bc3cbf50 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs @@ -39,8 +39,11 @@ namespace Xceed.Wpf.AvalonDock.Controls protected override void Close() { + if( (_document.Root != null) && (_document.Root.Manager != null) ) + { var dockingManager = _document.Root.Manager; - dockingManager._ExecuteCloseCommand(_document); + dockingManager._ExecuteCloseCommand( _document ); + } } #region Description diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs index 53e2c7c6..db4db6af 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs @@ -241,6 +241,10 @@ namespace Xceed.Wpf.AvalonDock.Controls _hwndSrc = HwndSource.FromDependencyObject(this) as HwndSource; _hwndSrcHook = new HwndSourceHook(FilterMessage); _hwndSrc.AddHook(_hwndSrcHook); + + // Restore maximize state + var maximized = Model.Descendents().OfType().Any(l => l.IsMaximized); + UpdateMaximizedState(maximized); } void OnUnloaded(object sender, RoutedEventArgs e) @@ -368,6 +372,8 @@ namespace Xceed.Wpf.AvalonDock.Controls { posElement.IsMaximized = isMaximized; } + IsMaximized = isMaximized; + WindowState = isMaximized ? WindowState.Maximized : WindowState.Normal; } @@ -423,11 +429,10 @@ namespace Xceed.Wpf.AvalonDock.Controls } break; case Win32Helper.WM_SYSCOMMAND: - IntPtr wMaximize = new IntPtr( Win32Helper.SC_MAXIMIZE ); - IntPtr wRestore = new IntPtr( Win32Helper.SC_RESTORE ); - if( wParam == wMaximize || wParam == wRestore ) + int command = (int)wParam & 0xFFF0; + if (command == Win32Helper.SC_MAXIMIZE || command == Win32Helper.SC_RESTORE) { - UpdateMaximizedState( wParam == wMaximize ); + UpdateMaximizedState( command == Win32Helper.SC_MAXIMIZE ); } break; } @@ -477,22 +482,24 @@ namespace Xceed.Wpf.AvalonDock.Controls #region IsMaximized /// - /// IsMaximized Read-Only Dependency Property + /// IsMaximized Dependency Property /// - private static readonly DependencyPropertyKey IsMaximizedPropertyKey - = DependencyProperty.RegisterReadOnly("IsMaximized", typeof(bool), typeof(LayoutFloatingWindowControl), - new FrameworkPropertyMetadata((bool)false)); - public static readonly DependencyProperty IsMaximizedProperty - = IsMaximizedPropertyKey.DependencyProperty; + = DependencyProperty.Register( "IsMaximized", typeof( bool ), typeof( LayoutFloatingWindowControl ), + new FrameworkPropertyMetadata( (bool)false ) ); /// - /// Gets the IsMaximized property. This dependency property + /// Gets/sets the IsMaximized property. This dependency property /// indicates if the window is maximized. /// public bool IsMaximized { get { return (bool)GetValue(IsMaximizedProperty); } + private set + { + SetValue(IsMaximizedProperty, value); + UpdatePositionAndSizeOfPanes(); + } } /// @@ -500,14 +507,12 @@ namespace Xceed.Wpf.AvalonDock.Controls /// This dependency property indicates if the window is maximized. /// /// The new value for the property. - protected void SetIsMaximized(bool value) - { - SetValue(IsMaximizedPropertyKey, value); - } protected override void OnStateChanged(EventArgs e) { - SetIsMaximized(WindowState == System.Windows.WindowState.Maximized); + //Windows sometimes send unwanted state changes (when minimizing application for instance) + //We force internal state to be used + WindowState = IsMaximized ? WindowState.Maximized : WindowState.Normal; base.OnStateChanged(e); } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChromeWorker.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChromeWorker.cs index e094ea4a..d62aed3e 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChromeWorker.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChromeWorker.cs @@ -317,11 +317,14 @@ namespace Microsoft.Windows.Shell rcLogicalClient.Right - rcLogicalWindow.Right, rcLogicalClient.Bottom - rcLogicalWindow.Bottom); - rootElement.Margin = new Thickness( - 0, - 0, - -(nonClientThickness.Left + nonClientThickness.Right), - -(nonClientThickness.Top + nonClientThickness.Bottom)); + if( rootElement != null ) + { + rootElement.Margin = new Thickness( + 0, + 0, + -(nonClientThickness.Left + nonClientThickness.Right), + -(nonClientThickness.Top + nonClientThickness.Bottom) ); + } // The negative thickness on the margin doesn't properly get applied in RTL layouts. // The width is right, but there is a black bar on the right. @@ -329,13 +332,16 @@ namespace Microsoft.Windows.Shell // This works fine, but if the window is dynamically changing its FlowDirection then this can have really bizarre side effects. // This will mostly work if the FlowDirection is dynamically changed, but there aren't many real scenarios that would call for // that so I'm not addressing the rest of the quirkiness. - if (_window.FlowDirection == FlowDirection.RightToLeft) + if( rootElement != null ) { - rootElement.RenderTransform = new MatrixTransform(1, 0, 0, 1, -(nonClientThickness.Left + nonClientThickness.Right), 0); - } - else - { - rootElement.RenderTransform = null; + if (_window.FlowDirection == FlowDirection.RightToLeft) + { + rootElement.RenderTransform = new MatrixTransform(1, 0, 0, 1, -(nonClientThickness.Left + nonClientThickness.Right), 0); + } + else + { + rootElement.RenderTransform = null; + } } if (!_isFixedUp) @@ -1177,8 +1183,11 @@ namespace Microsoft.Windows.Shell Assert.IsTrue(_isFixedUp); var rootElement = (FrameworkElement)VisualTreeHelper.GetChild(_window, 0); - // Undo anything that was done before. - rootElement.Margin = new Thickness(); + if( rootElement != null ) + { + // Undo anything that was done before. + rootElement.Margin = new Thickness(); + } _window.StateChanged -= _FixupRestoreBounds; _isFixedUp = false; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs index 241fd151..749d3c57 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs @@ -183,15 +183,15 @@ namespace Xceed.Wpf.AvalonDock //set focus on active element only after a layout pass is completed //it's possible that it is not yet visible in the visual tree - if (_setFocusAsyncOperation == null) - { - _setFocusAsyncOperation = Dispatcher.BeginInvoke(new Action(() => - { + //if (_setFocusAsyncOperation == null) + //{ + // _setFocusAsyncOperation = Dispatcher.BeginInvoke(new Action(() => + // { if (Layout.ActiveContent != null) FocusElementManager.SetFocusOnLastElement(Layout.ActiveContent); - _setFocusAsyncOperation = null; - } ), DispatcherPriority.Input ); - } + //_setFocusAsyncOperation = null; + // } ), DispatcherPriority.Input ); + //} } if (!_insideInternalSetActiveContent) @@ -2008,7 +2008,7 @@ namespace Xceed.Wpf.AvalonDock CreateDocumentLayoutItem(documentToImport); } - _suspendLayoutItemCreation = true; + _suspendLayoutItemCreation = false; var documentsSourceAsNotifier = documentsSource as INotifyCollectionChanged; @@ -2385,6 +2385,7 @@ namespace Xceed.Wpf.AvalonDock var anchorablesToRemove = Layout.Descendents().OfType().Where(d => e.OldItems.Contains(d.Content)).ToArray(); foreach (var anchorableToRemove in anchorablesToRemove) { + anchorableToRemove.Content = null; (anchorableToRemove.Parent as ILayoutContainer).RemoveChild( anchorableToRemove); } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs index e84d7195..1b2f5b35 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs @@ -426,6 +426,7 @@ namespace Xceed.Wpf.AvalonDock.Layout if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); + previousContainer.DockMinWidth = this.AutoHideMinWidth; parentGroup.Root.RootPanel.Children.Add(previousContainer); } else @@ -443,6 +444,7 @@ namespace Xceed.Wpf.AvalonDock.Layout if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) { previousContainer = new LayoutAnchorablePane(); + previousContainer.DockMinWidth = this.AutoHideMinWidth; parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); } else @@ -460,6 +462,7 @@ namespace Xceed.Wpf.AvalonDock.Layout if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); + previousContainer.DockMinHeight = this.AutoHideMinHeight; parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); } else @@ -477,6 +480,7 @@ namespace Xceed.Wpf.AvalonDock.Layout if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) { previousContainer = new LayoutAnchorablePane(); + previousContainer.DockMinHeight = this.AutoHideMinHeight; parentGroup.Root.RootPanel.Children.Add(previousContainer); } else diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs index b96ad2b6..3ed6a022 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs @@ -23,170 +23,201 @@ using System.Windows.Markup; namespace Xceed.Wpf.AvalonDock.Layout { - [ContentProperty("Children")] - [Serializable] - public class LayoutDocumentPane : LayoutPositionableGroup, ILayoutDocumentPane, ILayoutPositionableElement, ILayoutContentSelector, ILayoutPaneSerializable + [ContentProperty( "Children" )] + [Serializable] + public class LayoutDocumentPane : LayoutPositionableGroup, ILayoutDocumentPane, ILayoutPositionableElement, ILayoutContentSelector, ILayoutPaneSerializable + { + public LayoutDocumentPane() { - public LayoutDocumentPane() - { - } - public LayoutDocumentPane(LayoutContent firstChild) - { - Children.Add(firstChild); - } + } + public LayoutDocumentPane( LayoutContent firstChild ) + { + Children.Add( firstChild ); + } - protected override bool GetVisibility() - { - if (Parent is LayoutDocumentPaneGroup) - return ChildrenCount > 0; + protected override bool GetVisibility() + { + if( Parent is LayoutDocumentPaneGroup ) + return ChildrenCount > 0; - return true; - } + return true; + } - #region SelectedContentIndex + #region ShowHeader - private int _selectedIndex = -1; - public int SelectedContentIndex - { - get { return _selectedIndex; } - set - { - if (value < 0 || - value >= Children.Count) - value = -1; - - if (_selectedIndex != value) - { - RaisePropertyChanging("SelectedContentIndex"); - RaisePropertyChanging("SelectedContent"); - if (_selectedIndex >= 0 && - _selectedIndex < Children.Count) - Children[_selectedIndex].IsSelected = false; - - _selectedIndex = value; - - if (_selectedIndex >= 0 && - _selectedIndex < Children.Count) - Children[_selectedIndex].IsSelected = true; - - RaisePropertyChanged("SelectedContentIndex"); - RaisePropertyChanged("SelectedContent"); - } - } - } + private bool _showHeader = true; + public bool ShowHeader + { + get + { + return _showHeader; + } + set + { + if( value != _showHeader ) + { + _showHeader = value; + RaisePropertyChanged( "ShowHeader" ); + } + } + } - protected override void ChildMoved(int oldIndex, int newIndex) - { - if (_selectedIndex == oldIndex) - { - RaisePropertyChanging("SelectedContentIndex"); - _selectedIndex = newIndex; - RaisePropertyChanged("SelectedContentIndex"); - } + #endregion + #region SelectedContentIndex - base.ChildMoved(oldIndex, newIndex); - } + private int _selectedIndex = -1; + public int SelectedContentIndex + { + get + { + return _selectedIndex; + } + set + { + if( value < 0 || + value >= Children.Count ) + value = -1; + + if( _selectedIndex != value ) + { + RaisePropertyChanging( "SelectedContentIndex" ); + RaisePropertyChanging( "SelectedContent" ); + if( _selectedIndex >= 0 && + _selectedIndex < Children.Count ) + Children[ _selectedIndex ].IsSelected = false; + + _selectedIndex = value; + + if( _selectedIndex >= 0 && + _selectedIndex < Children.Count ) + Children[ _selectedIndex ].IsSelected = true; + + RaisePropertyChanged( "SelectedContentIndex" ); + RaisePropertyChanged( "SelectedContent" ); + } + } + } - public LayoutContent SelectedContent - { - get { return _selectedIndex == -1 ? null : Children[_selectedIndex]; } - } - #endregion + protected override void ChildMoved( int oldIndex, int newIndex ) + { + if( _selectedIndex == oldIndex ) + { + RaisePropertyChanging( "SelectedContentIndex" ); + _selectedIndex = newIndex; + RaisePropertyChanged( "SelectedContentIndex" ); + } - protected override void OnChildrenCollectionChanged() - { - if (SelectedContentIndex >= ChildrenCount) - SelectedContentIndex = Children.Count - 1; - if (SelectedContentIndex == -1 && ChildrenCount > 0) - { - if( Root == null ) - { - SetNextSelectedIndex(); - } - else - { - var childrenToSelect = Children.OrderByDescending( c => c.LastActivationTimeStamp.GetValueOrDefault() ).First(); - SelectedContentIndex = Children.IndexOf( childrenToSelect ); - childrenToSelect.IsActive = true; - } - } - - base.OnChildrenCollectionChanged(); - - RaisePropertyChanged("ChildrenSorted"); - } - public int IndexOf(LayoutContent content) - { - return Children.IndexOf(content); - } + base.ChildMoved( oldIndex, newIndex ); + } - protected override void OnIsVisibleChanged() - { - UpdateParentVisibility(); - base.OnIsVisibleChanged(); - } + public LayoutContent SelectedContent + { + get + { + return _selectedIndex == -1 ? null : Children[ _selectedIndex ]; + } + } + #endregion - internal void SetNextSelectedIndex() + protected override void OnChildrenCollectionChanged() + { + if( SelectedContentIndex >= ChildrenCount ) + SelectedContentIndex = Children.Count - 1; + if( SelectedContentIndex == -1 && ChildrenCount > 0 ) + { + if( Root == null ) { - SelectedContentIndex = -1; - for( int i = 0; i < this.Children.Count; ++i ) - { - if( Children[ i ].IsEnabled ) - { - SelectedContentIndex = i; - return; - } - } + SetNextSelectedIndex(); } - - void UpdateParentVisibility() + else { - var parentPane = Parent as ILayoutElementWithVisibility; - if (parentPane != null) - parentPane.ComputeVisibility(); + var childrenToSelect = Children.OrderByDescending( c => c.LastActivationTimeStamp.GetValueOrDefault() ).First(); + SelectedContentIndex = Children.IndexOf( childrenToSelect ); + childrenToSelect.IsActive = true; } + } - public IEnumerable ChildrenSorted - { - get - { - var listSorted = Children.ToList(); - listSorted.Sort(); - return listSorted; - } - } + base.OnChildrenCollectionChanged(); + + RaisePropertyChanged( "ChildrenSorted" ); + } + + public int IndexOf( LayoutContent content ) + { + return Children.IndexOf( content ); + } - string _id; - string ILayoutPaneSerializable.Id + protected override void OnIsVisibleChanged() + { + UpdateParentVisibility(); + base.OnIsVisibleChanged(); + } + + internal void SetNextSelectedIndex() + { + SelectedContentIndex = -1; + for( int i = 0; i < this.Children.Count; ++i ) + { + if( Children[ i ].IsEnabled ) { - get - { - return _id; - } - set - { - _id = value; - } + SelectedContentIndex = i; + return; } + } + } - public override void WriteXml(System.Xml.XmlWriter writer) - { - if (_id != null) - writer.WriteAttributeString("Id", _id); + void UpdateParentVisibility() + { + var parentPane = Parent as ILayoutElementWithVisibility; + if( parentPane != null ) + parentPane.ComputeVisibility(); + } - base.WriteXml(writer); - } + public IEnumerable ChildrenSorted + { + get + { + var listSorted = Children.ToList(); + listSorted.Sort(); + return listSorted; + } + } - public override void ReadXml(System.Xml.XmlReader reader) - { - if (reader.MoveToAttribute("Id")) - _id = reader.Value; + string _id; + string ILayoutPaneSerializable.Id + { + get + { + return _id; + } + set + { + _id = value; + } + } + public override void WriteXml( System.Xml.XmlWriter writer ) + { + if( _id != null ) + writer.WriteAttributeString( "Id", _id ); + if( !_showHeader ) + writer.WriteAttributeString( "ShowHeader", _showHeader.ToString() ); - base.ReadXml(reader); - } + base.WriteXml( writer ); + } + + public override void ReadXml( System.Xml.XmlReader reader ) + { + if( reader.MoveToAttribute( "Id" ) ) + _id = reader.Value; + if( reader.MoveToAttribute( "ShowHeader" ) ) + _showHeader = bool.Parse( reader.Value ); + + + base.ReadXml( reader ); + } #if TRACE @@ -200,5 +231,5 @@ namespace Xceed.Wpf.AvalonDock.Layout } #endif - } + } } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPositionableGroup.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPositionableGroup.cs index 2e15445e..fa05d8ea 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPositionableGroup.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPositionableGroup.cs @@ -105,7 +105,7 @@ namespace Xceed.Wpf.AvalonDock.Layout #region DockMinWidth - private double _dockMinWidth = 100.0; + private double _dockMinWidth = 25.0; public double DockMinWidth { get { return _dockMinWidth; } @@ -125,7 +125,7 @@ namespace Xceed.Wpf.AvalonDock.Layout #region DockMinHeight - private double _dockMinHeight = 100.0; + private double _dockMinHeight = 25.0; public double DockMinHeight { get { return _dockMinHeight; } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/generic.xaml index 6922309f..e62b3f31 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/generic.xaml @@ -43,8 +43,9 @@ - - + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/AssemblyVersionInfo.cs index 8eae29c7..d542890a 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/AssemblyVersionInfo.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/AssemblyVersionInfo.cs @@ -19,7 +19,7 @@ internal static class _XceedVersionInfo { [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] - public const string BaseVersion = "2.7"; + public const string BaseVersion = "2.8"; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] public const string Version = BaseVersion + ".0.0"; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/Utils/Wpf/TreeHelper.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/Utils/Wpf/TreeHelper.cs index 3d3befd2..6f6015a2 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/Utils/Wpf/TreeHelper.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/Utils/Wpf/TreeHelper.cs @@ -277,7 +277,11 @@ namespace Xceed.Utils.Wpf var childrenCount = VisualTreeHelper.GetChildrenCount( parent ); for( int i = 0; i < childrenCount; i++ ) { - yield return VisualTreeHelper.GetChild( parent, i ); + var child = VisualTreeHelper.GetChild( parent, i ); + if( child != null ) + { + yield return child; + } } } } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml index 8850391a..24cd5bef 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml @@ -624,7 +624,6 @@ IsPlusOnlyFeature="True"/> diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs index e2b9038e..59f85eca 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs @@ -49,8 +49,8 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion( "2.7.*" )] -[assembly: AssemblyFileVersion( "2.7.0.0" )] +[assembly: AssemblyVersion( "2.8.*" )] +[assembly: AssemblyFileVersion( "2.8.0.0" )] #pragma warning disable 1699 [assembly: AssemblyDelaySign( false )] diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx index b02abf1b..e2fa0806 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx @@ -3,7 +3,7 @@ +