This example illustrates how to change border of the stacked header and its records in WPF DataGrid (SfDataGrid).
You can change the border around each stacked header column by writing style for GridStackedHeaderCellControl in WPF DataGrid (SfDataGrid). For applying the same border thickness over the complete grid, write style for GridHeaderCellControl and GridCell.
KB article - How to change border of the stacked header and its records in WPF DataGrid (SfDataGrid)?