I would like to change the background color of a WPF TabControl:

Changing the background color of the TabControl does not work, because the Grid element (direct child of the TabControl) doesn't inherit the backround of its parent:

The code below works, but it changes the background color of all subsequent grids:
<TabControl>
<TabControl.Resources>
<Style TargetType="Grid">
<Setter Property="Background" Value="Green" />
</Style>
</TabControl.Resources>
<!-- ... -->
</TabControl>
Is there a more appropriate solution?
While writing answer, nkoniishvt has already given right idea in comments, but I anyway will finish posting complete example.
Add
xmlns:s="clr-namespace:System;assembly=mscorlib"namespace in your control.Add this
ControlTemplatein yourResourceDictionaryin xaml:For example I set
Background="Aqua"forTabPanelelement inside rootGrid.Assign this
ControlTemplateto theTemplateproperty of TabControl: