title: WPF Toolbar Background property ignored in style
body: <p>Setting the Background property in a ToolBar style has no effect when the ToolBar is contained in a ToolBarTray. Other properties e.g. Margin work. Setting the property directly in the ToolBar works but as I want a LinearGradientBrush the aim is to encapsulate this in the style. It also works if the ToolBar is removed from the tray, but I need the tray to make it vertical. What am I missing?</p>
  
  <p>That's quick! I have tried it with and without a style for the tray, also telling the tray it has null style but it has no effect either way. At present the tray has no style. The mark up is:</p>
  
  <pre><code>    &lt;Style x:Key="MyToolBarStyle" TargetType="ToolBar"&gt;
          &lt;Setter Property="Margin" Value="0"/&gt;
          &lt;Setter Property="HorizontalAlignment" Value="Center"/&gt;
          &lt;Setter Property="FontSize" Value="18"/&gt;
          &lt;Setter Property="FontWeight" Value="Bold"/&gt;
          &lt;Setter Property="UseLayoutRounding" Value="True"/&gt;
          &lt;Setter Property="Background"&gt;
              &lt;Setter.Value&gt;
                  &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox"&gt;
                      &lt;GradientStop Color="#FFF70150"/&gt;
                      &lt;GradientStop Color="#FF0986EE" Offset="1"/&gt;
                      &lt;GradientStop Color="#FF1F060D" Offset="1"/&gt;
                      &lt;GradientStop Color="#FFE680AC"/&gt;
                      &lt;/LinearGradientBrush&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p>The toolbar (with the button list shortened) is:</p>
  
  <pre><code>        &lt;ToolBarTray Grid.Row="0" Grid.Column="0" Orientation="Vertical" Grid.RowSpan="50" Margin="5,0"&gt;
              &lt;ToolBar x:Name="MyToolBar" Style="{StaticResource MyToolBarStyle}" Header="Main menu"&gt;
                  &lt;Button x:Name="New_Network" Style="{StaticResource MyButtonStyle}" PreviewMouseLeftButtonDown="New_Net_Click" Content="New Network"/&gt;
              &lt;/ToolBar&gt;
          &lt;/ToolBarTray&gt;
  </code></pre>