I am writing a text editor in WPF and I seem to have a strange border that I can't remove.
I've got a grid with a tabcontrol, and when a user selects "File -> New", I programatically add a new tabitem to the tabcontrol. I'm setting the tabitem content to an instance of WindowsFormsHost in order to host the ScintillaNet WinForms control.
Here's the problem: http://i.imgur.com/kotSb.png
I'm pretty sure the border is not coming from the WinForms control itself, as I've used it elsewhere in the same configuration and it has no border.
The red border you see is added by me to highlight the problem (in the method that is responding to File -> New), with the following code:
tabControl.BorderThickness = new Thickness(3, 3, 3, 3);
tabControl.BorderBrush = Brushes.Red;
tabControl.Items.Add(tab);
tab.Focus();
Any ideas where this inner grey border is coming from?