MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
Binding errors in DataGrid with ColumnVirtualiztion on
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 16.3k
- Forks
- 3.5k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 8
Description
When ColumnVirtualization is on, (or both Row and Column virtualization)
EnableColumnVirtualization="True"
Visual Studio Debugger reports many binding errors in following properties, maybe some other as well:
DataGridCell.Foreground
DataGridColumnHeader.BorderThickness
ListSortDirectionIndicator.Visibility, Name='SortDirectionIndicator'
DataGridColumnHeader.BorderBrush
Those binding throw Exceptions, because they refer with RelativeSource to DataGrid or other grid related elements. I guess that this fails during virtualization magic, when elements are detached from visual tree.
FallbackValue or TargetNullValue don't mitigate this, as error occurs in RelativeSource, so before they come into play.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with EnableColumnVirtualization="True" and inspect the binding definitions for DataGridCell.Foreground, DataGridColumnHeader.BorderThickness, ListSortDirectionIndicator.Visibility, and DataGridColumnHeader.BorderBrush. Done means the listed bindings no longer report exceptions in the Visual Studio debugger when column or row-and-column virtualization is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100