Browse Source

Merge 38d36f2367 into c5b3599c07

pull/1393/merge
Jacob Colyer 8 years ago
committed by GitHub
parent
commit
05d7387586
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableTabItem.cs
  2. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs
  3. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPositionableGroup.cs

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableTabItem.cs

@ -181,7 +181,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
base.OnMouseEnter( e );
if( _draggingItem != this &&
if( _draggingItem != null &&
_draggingItem != this &&
e.LeftButton == MouseButtonState.Pressed )
{
var model = Model;

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

@ -416,7 +416,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
else
{
var width = ( prevChildModel.DockWidth.IsAuto ) ? prevChildActualSize.Width : prevChildModel.DockWidth.Value;
prevChildModel.DockWidth = new GridLength( width + delta, GridUnitType.Pixel );
var resizedWidth = width + delta;
prevChildModel.DockWidth = new GridLength( double.IsNaN(resizedWidth) ? width : resizedWidth, GridUnitType.Pixel );
}
if( nextChildModel.DockWidth.IsStar )
@ -426,7 +427,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
else
{
var width = ( nextChildModel.DockWidth.IsAuto ) ? nextChildActualSize.Width : nextChildModel.DockWidth.Value;
nextChildModel.DockWidth = new GridLength( width - delta, GridUnitType.Pixel );
var resizedWidth = width - delta;
nextChildModel.DockWidth = new GridLength( double.IsNaN(resizedWidth) ? width : resizedWidth, GridUnitType.Pixel );
}
}
else
@ -438,7 +440,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
else
{
var height = ( prevChildModel.DockHeight.IsAuto ) ? prevChildActualSize.Height : prevChildModel.DockHeight.Value;
prevChildModel.DockHeight = new GridLength( height + delta, GridUnitType.Pixel );
var resizedHeight = height + delta;
prevChildModel.DockHeight = new GridLength( double.IsNaN(resizedHeight) ? height : resizedHeight, GridUnitType.Pixel );
}
if( nextChildModel.DockHeight.IsStar )
@ -448,7 +451,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
else
{
var height = ( nextChildModel.DockHeight.IsAuto ) ? nextChildActualSize.Height : nextChildModel.DockHeight.Value;
nextChildModel.DockHeight = new GridLength( height - delta, GridUnitType.Pixel );
var resizedHeight = height - delta;
nextChildModel.DockHeight = new GridLength( double.IsNaN(resizedHeight) ? height : resizedHeight, GridUnitType.Pixel );
}
}

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPositionableGroup.cs

@ -50,7 +50,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
set
{
if( DockWidth != value )
if( DockWidth != value && value.Value > 0 )
{
RaisePropertyChanging( "DockWidth" );
_dockWidth = value;
@ -74,7 +74,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
}
set
{
if( DockHeight != value )
if( DockHeight != value && value.Value > 0 )
{
RaisePropertyChanging( "DockHeight" );
_dockHeight = value;

Loading…
Cancel
Save