title: Mac Style DockBar Functionality in WPF
body: <p>I am trying to imitate the DockBar on Mac or the ObjectBar. In the process I hope to learn WPF Custom Controls and hopefully create a usable control for me and the community. So far I have this</p>
  
  <pre><code>&lt;Window x:Class="WPFMacStyleTBar.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Window1" Height="356" Width="577"&gt;
  &lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition/&gt;
          &lt;RowDefinition/&gt;
          &lt;RowDefinition/&gt;
          &lt;RowDefinition/&gt;
          &lt;RowDefinition/&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid Grid.Row="3"&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition/&gt;
              &lt;ColumnDefinition/&gt;
              &lt;ColumnDefinition/&gt;
              &lt;ColumnDefinition/&gt;
              &lt;ColumnDefinition/&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;Button Grid.Column="1" x:Name="btnHome" Background="Transparent" BorderBrush="Transparent" Margin="0,0,47,0" Foreground="Transparent"&gt;
              &lt;Button.Content&gt;
                  &lt;Image Source="C:\Vikram\Projects\WPFMacStyleTBar\WPFMacStyleTBar\Images\Home.png"&gt;&lt;/Image&gt;
              &lt;/Button.Content&gt;
          &lt;/Button&gt;
          &lt;Button Grid.Column="2" x:Name="btnGlobe" Background="Transparent" BorderBrush="Transparent" Margin="0,0,47,0" Foreground="Transparent"&gt;
              &lt;Button.Content&gt;
                  &lt;Image Source="C:\Vikram\Projects\WPFMacStyleTBar\WPFMacStyleTBar\Images\Globe.png"&gt;&lt;/Image&gt;
              &lt;/Button.Content&gt;
          &lt;/Button&gt;
          &lt;Button Grid.Column="3" x:Name="btnNotes" Background="Transparent" BorderBrush="Transparent" Margin="0,0,49,0" Foreground="Transparent"&gt;
              &lt;Button.Content&gt;
                  &lt;Image Source="C:\Vikram\Projects\WPFMacStyleTBar\WPFMacStyleTBar\Images\Notes.png"&gt;&lt;/Image&gt;
              &lt;/Button.Content&gt;
          &lt;/Button&gt;
      &lt;/Grid&gt;        
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>It's a little rudimentary but I felt for starters this should be fine. The problem that I am facing are even after setting the background and the border to Transparent, the button border still shows up. On top of it I want to button region to cropped to that of the image. I would appreciate help on how this can be done.</p>
  
  <p>EDIT</p>
  
  <p>I found what I was looking for <a href="https://stackoverflow.com/questions/2899948/get-rid-of-button-border-in-wpf">here</a></p>