You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When changing IsVisible to "false" on the second last visible column the selector for DataGridColumnHeadersPresenter DataGridColumnHeader:nth-last-child(1), and when change IsVisible to "false" on third, fourth etc. the style that should be applied to the last child is applied to the 2nd last child.
Before:
In DataGrid.OnInsertedColumn_PreNotification the new column is inserted, InsertDisplayedColumnHeader, before EnsureHorizontalLayout.
The call to InsertDisplayedColumnHeader leads to DataGridColumnHeadersPresenter.InvalidateChildIndex that uses DataGridColumnCollection._columnsMap but it is not yet updated because it is updated in EnsureVisibleEdgedColumnsWidth called by EnsureHorizontalLayout.
Describe the bug
When changing IsVisible to "false" on the second last visible column the selector for
DataGridColumnHeadersPresenter DataGridColumnHeader:nth-last-child(1)
, and when change IsVisible to "false" on third, fourth etc. the style that should be applied to the last child is applied to the 2nd last child.Before:
After turning of Col1:
Or if you instead turn of Col0:
To Reproduce
Example code, axaml:
ViewModel:
Change ShowCol1 or ShowCol0 to false to reproduce their respective problems.
Expected behavior
The last item should always be seen and be the one with red.
The text was updated successfully, but these errors were encountered: