question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataGrid make cells blank after horizontal scroll with ImmediateRenderer

See original GitHub issue

The issue occurs when ImmediateRenderer is being used. When the DataGrid has multiple columns and the content can be scrolled horizontally, cells’ content disappear as user keeps on scrolling.

Scenario to reproduce I’ve prepared minimal showcase application, available here: https://github.com/macpawluk/data-grid-immediate-renderer-bug

  1. Launch the app
  2. Try to scroll the DataGrid horizontally

Observe the content is disappearing even though these cells are still visible in the viewport.

Expected behavior Cell’s content should stay visible if they remain in the viewport.

Screenshots DataGridIssue

image

Desktop

  • OS: Windows, Mac
  • Version 0.10.4

Additional context The issue occurs only when using ImmediateRenderer - it’s important in my case as in the project we use it as a solution for visual glitches on Mac M1 machines.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkatz6commented, Dec 12, 2022

@macpawluk fixed in the 11.0 previews.

0reactions
macpawlukcommented, Jan 4, 2023

Here is a workaround that can be used:

<Style Selector="DataGridCellsPresenter">
    <Setter Property="ClipToBounds" Value="True" />
</Style>

credits to @donandren

Read more comments on GitHub >

github_iconTop Results From Across the Web

WPF DataGrid horizontal scrollbar not showing
I think that when the Datagrid is empty, the ScrollViewer doesn't handle anything. Try to fill the columns by adding an ItemsSource ...
Read more >
Cell content disappearing when scrolling horizontally
When person scrolls to the right and then left again, left cells are either empty or have wrong data in them.
Read more >
WPF DataGrid with 1 frozen column - horizontal scroll ...
I have a very simple WPF app with a DataGrid with 1 frozen column. When I scroll horizontally (to the right or left)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found