From 47365347afc98bda37568e6441132122895b065c Mon Sep 17 00:00:00 2001 From: Martin Ruiz Date: Mon, 18 Nov 2024 14:59:44 -0800 Subject: [PATCH] Handle negative value for SolutionView width (#6146) --- .../NuGet.PackageManagement.UI/Xamls/SolutionView.xaml.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/NuGet.Clients/NuGet.PackageManagement.UI/Xamls/SolutionView.xaml.cs b/src/NuGet.Clients/NuGet.PackageManagement.UI/Xamls/SolutionView.xaml.cs index 7c0e2a83d98..12b9c29698e 100644 --- a/src/NuGet.Clients/NuGet.PackageManagement.UI/Xamls/SolutionView.xaml.cs +++ b/src/NuGet.Clients/NuGet.PackageManagement.UI/Xamls/SolutionView.xaml.cs @@ -259,7 +259,10 @@ private void ListView_SizeChanged(object sender, SizeChangedEventArgs e) } var newWidth = _projectColumnHeader.ActualWidth + width; - _projectColumn.Width = newWidth; + if (newWidth > 0) + { + _projectColumn.SetValue(Canvas.WidthProperty, newWidth); + } // this width adjustment is only done once. _projectList.SizeChanged -= ListView_SizeChanged;