Also, the following code causes huge borders around the grid headers even though it sets no style properties:
Style
DRPStyle = new Style {TargetType = typeof(DataRecordPresenter
) };
DRPStyle.Setters.Add(
new EventSetter { Event = LoadedEvent, Handler = new RoutedEventHandler
(AccountGrid_DataRecordPresenter_Loaded) });
Hello Sam,
Thank you for your post. I have been looking into it and I can say that this behavior is expected, since the DataRecordPresenters are created dynamically when they are needed for visualizing data and, when you set the Visibility of the XamDataGrid to Collapsed they are not needed.
Hope this helps you.