Browse Source

Prevent crash from setting negative size

This change temporarily fixes several issues, as described in #1381 and #1379. The fix is such that the AvalonDock will no longer crash when the control goes out of bounds. However, this does not prevent the actual control from going out of bounds. Therefore, this fix should only be used as a stop-gap until an actual fix can be implemented.
pull/1393/head
Jacob Colyer 8 years ago
committed by GitHub
parent
commit
38d36f2367
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPositionableGroup.cs

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

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

Loading…
Cancel
Save