Skip to content

Conversation

@ruan-luidy
Copy link

Problem

The DataGridCellStyle template has a hardcoded Margin="0,0,4,0" on the inner Border element, which creates an unnecessary 4px gap on the right side of each cell. This makes cells look misaligned and creates unwanted spacing, especially noticeable when editing cells.

Solution

Changed Margin="0,0,4,0" to Margin="0" in the DataGridCell ControlTemplate.

Screenshots

Before:
Captura de tela 2025-12-17 103417

After:
Captura de tela 2025-12-17 142951

Testing

  • Tested with DataGrid.Small style
  • Cell selection still works correctly
  • Editing mode works correctly
  • All cell states (selected, editing, inactive) render properly
  • No visual regressions found

Files Changed

  • src/Shared/HandyControl_Shared/Themes/Styles/Base/DataGridBaseStyle.xaml

Updated DataGridCell control templates in both Base and Theme styles to set the inner Border's margin from '0,0,4,0' to '0,0,0,0', ensuring no extra right spacing in DataGrid cells.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant