Last Updated:
27 Jun 2025 07:24
by Teddy
DataGrid: [WinUI] [MacCatalyst] NullReferenceException is thrown when a column is resized and scrolled out of the viewport
When a column in the DataGrid is being resized and is subsequently scrolled out of the viewport, a NullReferenceException is thrown. This happens because the column's model is recycled while the resize operation is still in progress. As a result, the resize logic attempts to access a column from a recycled (and now null) model, leading to the exception.