Skip to content

Commit 0a32668

Browse files
committed
Make sure that changing the sibling column doesn't violate the current column min width
1 parent 753832d commit 0a32668

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.Events.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@ private bool HorizontalMove(double horizontalChange)
254254
// if sibling column has fixed width then resize it
255255
else if (!IsStarColumn(SiblingColumn))
256256
{
257+
// Would adding to this column make the current column violate the MinWidth?
258+
if (IsValidColumnWidth(CurrentColumn, horizontalChange) == false)
259+
{
260+
return false;
261+
}
262+
257263
if (!SetColumnWidth(SiblingColumn, horizontalChange * -1, GridUnitType.Pixel))
258264
{
259265
return true;

0 commit comments

Comments
 (0)