This article covers the low-level visual primitives used by TreeDataGrid templates.
TreeDataGridRow: :selectedTreeDataGridCell: :selected, :editingTreeDataGridColumnHeader: :resizableThese are the key hooks for high-performance styling.
TreeDataGridCell manages:
EndEdit) and cancel (CancelEdit)CellValueChanged signal through owner gridBegin-edit behavior is controlled by BeginEditGestures.
<Style Selector="TreeDataGridRow:selected">
<Setter Property="Background" Value="#1F3A5F"/>
</Style>
<Style Selector="TreeDataGridCell:editing">
<Setter Property="Background" Value="#FFF6D5"/>
</Style>
<Style Selector="TreeDataGridColumnHeader:resizable">
<Setter Property="Cursor" Value="SizeWestEast"/>
</Style>
Editing template loses focus too early Cause: editing content is hosted in popup or descendant focus chain not tracked by custom template.
Checkbox cell value appears stale Cause: model does not implement expected property change notifications.
Row drag starts unexpectedly Cause: pointer movement exceeds drag threshold while selection gestures are active.