Skip to content

Commit c51a04f

Browse files
authored
Merge pull request #225 from unoplatform/mergify/bp/unorel/winui/7.1.200/pr-224
fix(DataGrid): not displaying cells from last columns when resized from scrolled state (backport #224)
2 parents 7b3d97d + c90b056 commit c51a04f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CommunityToolkit.WinUI.UI.Controls.DataGrid/DataGrid/DataGridColumns.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,6 +1245,14 @@ private bool ComputeDisplayedColumns()
12451245
_horizontalOffset -= GetEdgedColumnWidth(dataGridColumn);
12461246
dataGridColumn = this.ColumnsInternal.GetPreviousVisibleScrollingColumn(dataGridColumn);
12471247
}
1248+
1249+
if (_horizontalOffset == 0 && cx < displayWidth)
1250+
{
1251+
// if the columns have been scrolled, and all visible columns are fully rendered in the available space,
1252+
// then HorizontalAdjustment needs to be updated so that DataGridCellsPresenter.ShouldDisplayCell
1253+
// don't hide columns based on the old value.
1254+
HorizontalAdjustment = displayWidth - cx;
1255+
}
12481256
}
12491257

12501258
// third try to partially scroll in first scrolled off column

nuget.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<clear />
55
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
66
<add key="AzureLatest" value="https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-MainLatest/nuget/v3/index.json" protocolVersion="3" />
7-
<add key="MUX-Shared" value="https://pkgs.dev.azure.com/ms/microsoft-ui-xaml/_packaging/MUX-Shared/nuget/v3/index.json" />
87
<add key="unoplatformdev" value="https://pkgs.dev.azure.com/uno-platform/1dd81cbd-cb35-41de-a570-b0df3571a196/_packaging/unoplatformdev/nuget/v3/index.json" />
98
</packageSources>
109
<disabledPackageSources>

0 commit comments

Comments
 (0)