title: WPF button with drop down list and arrow
body: <p>Can someone suggest the best way to have a button with an arrow and dropdown list like in visual studio toolbar button new item. As you can find in VS the mouse hover is highlighting both default button and arrow button and after selecting an item from list the default button is changing according your selection.</p>
  
  <p><img src="https://i.stack.imgur.com/NkPtL.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/Ui8Lp.png" alt="enter image description here"></p>
  
  <p>Here is a piece of code which is showing drop down menu, but not for full functionality described above:</p>
  
  <pre><code>&lt;StackPanel Orientation="Horizontal"&gt;
      &lt;Border CornerRadius="0" BorderBrush="Black" BorderThickness="1"&gt;
          &lt;Button Name="CreateButton" Click="CreateButton_Click"  Background="Transparent" BorderBrush="{x:Null}"&gt;
              &lt;Image Source="/OMS.Resources;component/Resources/Images/LibraryImages/add1.png" /&gt;
              &lt;Button.ContextMenu&gt;
                  &lt;ContextMenu HorizontalAlignment="Right"&gt;
                      &lt;MenuItem Header=" doc" Click="CreateDocButton_Click"&gt;
                          &lt;MenuItem.Icon&gt;
                              &lt;Image Source="/OMS.Resources;component/Resources/Images/LibraryImages/add_sheet.png" Width="24" Height="24" /&gt;
                          &lt;/MenuItem.Icon&gt;
                      &lt;/MenuItem&gt;
                      &lt;MenuItem Header=" xls" Click="CreateXlsButton_Click"&gt;
                          &lt;MenuItem.Icon&gt;
                              &lt;Image Source="/OMS.Resources;component/Resources/Images/LibraryImages/add_sheet.png" Width="24" Height="24" /&gt;
                          &lt;/MenuItem.Icon&gt;
                      &lt;/MenuItem&gt;
                      &lt;MenuItem Header=" txt" Click="CreateTxtButton_Click"&gt;
                          &lt;MenuItem.Icon&gt;
                              &lt;Image Source="/OMS.Resources;component/Resources/Images/LibraryImages/add_sheet.png" Width="24" Height="24" /&gt;
                          &lt;/MenuItem.Icon&gt;
                      &lt;/MenuItem&gt;
                  &lt;/ContextMenu&gt;
              &lt;/Button.ContextMenu&gt;
          &lt;/Button&gt;
      &lt;/Border&gt;
      &lt;Border CornerRadius="0" BorderBrush="Black" BorderThickness="1"&gt;
          &lt;Button HorizontalAlignment="Left" VerticalAlignment="Stretch"  Background="Transparent" BorderBrush="{x:Null}"
          ContextMenuService.IsEnabled="False" Click="AddButtonContextMenu_Click"&gt;
              &lt;Image Source="/OMS.Resources;component/Resources/Images/LibraryImages/arrow_down.png" VerticalAlignment="Center" Width="9" /&gt;
          &lt;/Button&gt;
      &lt;/Border&gt;
  &lt;/StackPanel&gt;
  </code></pre>