Q: WPF default style vs inheritance I have to integrate a multiselect tree view into our existing wpf application (.NET 3.5). As this functionality isn't available out of the box, I've downloaded TreeViewEx which does what I need (after a few adaptations for .NET 3.5).
The sample application which is configured like this
<Window 
    x:Class="W7StyleSample.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=TreeViewEx" 
    xmlns:Model="clr-namespace:W7StyleSample.Model" 
    Title="MainWindow" Height="350" Width="261"
    AutomationProperties.Name="TestApp2Window" >
    <Window.Resources>
        <Style TargetType="Controls:TreeViewExItem">
            <Setter Property="IsExpanded" Value="{Binding IsExpandedValue}"/>
        </Style>
    </Window.Resources>
    <DockPanel>
        <Controls:TreeViewEx x:Name="tree"
         AutomationProperties.Name="TestApp2Tree"
         ItemsSource="{Binding Children}">
            <Controls:TreeViewEx.ItemTemplate>
                <HierarchicalDataTemplate ItemsSource="{Binding Children}" DataType="{x:Type Model:Node}">
                    <TextBlock Text="{Binding}"/>
                </HierarchicalDataTemplate>
            </Controls:TreeViewEx.ItemTemplate>
        </Controls:TreeViewEx>
    </DockPanel>
</Window>

Looks like this when being run:

This is exactly what I want for foreground, backround, item highlighting, selection etc.
When I integrate it in my application like this:
<controls:TreeViewEx Name="m_tvLeft" 
                     ItemsSource="{Binding Source={StaticResource LeftGridSource}}" 
                     SelectionChanged="OnTvLeftSelectionChanged"
                     MouseDoubleClick="OnTvLeftItemMouseDoubleClick" />

It looks like this:

The row hight is too large, the highlighting color is not as wanted, the expandable nodes can't be expanded.
Question: How can I style this component to look the same as in the demo application?
I'm no WPF wizard, but guess this has to do with style inheritance. After doing quite some research, I haven't been able to find the source of this styling nor a way to override it as wanted.
Some solution attempts:
Apply style to :
<controls:TreeViewEx Name="m_tvLeft" 
                     ItemsSource="{Binding Source={StaticResource LeftGridSource}}" 
                     SelectionChanged="OnTvLeftSelectionChanged"
                     MouseDoubleClick="OnTvLeftItemMouseDoubleClick">
   <controls:TreeViewEx.Resources>
      <Style TargetType="controls:TreeViewExItem">
         <Setter Property="Margin" Value="0"/>
         <Setter Property="Padding" Value="0"/>
         <Setter Property="FontSize" Value="10"/>
      </Style>
   </controls:TreeViewEx.Resources>
</controls:TreeViewEx>

With this, the font size is being applied correctly, but the margin between two tree nodes doesn't diminish.
<controls:TreeViewEx Name="m_tvLeft" 
                     ItemsSource="{Binding Source={StaticResource LeftGridSource}}" 
                     SelectionChanged="OnTvLeftSelectionChanged"
                     MouseDoubleClick="OnTvLeftItemMouseDoubleClick">
   <controls:TreeViewEx.Resources>
      <Style TargetType="controls:TreeViewExItem" BaseOn="{x:Null}"/>
   </controls:TreeViewEx.Resources>
</controls:TreeViewEx>

I can't see no effect whatsoever using this style.
