title: Show/hide button with BooleanToVisibilityConverter does not work
body: <p>In my application I want to show/hide a button according to the users authorization level.
  If the user is a team leader the button should be shown. If the user is not a team leader it shouldn't be shown.</p>
  
  <p>I tried to resolve this issue using a <code>BooleanToVisibilityConverter</code> which is defined in my resource dictionary:
  </p>
  
  <pre><code>&lt;BooleanToVisibilityConverter x:Key="VisibilityConverter" /&gt;
  </code></pre>
  
  <p>Implementation of the converter:</p>
  
  
  
  <pre><code>&lt;Button Grid.Row="1" Grid.Column="5"
  Click="TeamLeader_Click" Visibility="{Binding IsTeamLeader, Converter={StaticResource
  VisibilityConverter}}" Style="{StaticResource ButtonStyleMenu}" /&gt;
  </code></pre>
  
  <p>In my code behind class I'm using a dependency property to change the visibility of the button.</p>
  
  
  
  <pre><code>public static readonly DependencyProperty IsTeamLeaderProperty =
  DependencyProperty.Register("IsTeamLeader", typeof(bool),
  typeof(MainMenu), new FrameworkPropertyMetadata(false));
  
  public bool IsTeamLeader
  {
      get { return (bool)GetValue(IsTeamLeaderProperty); }
      set { SetValue(IsTeamLeaderProperty, value); }
  }
  </code></pre>
  
  <p>In the "loaded event" of my user control I initialize my property with <code>false</code> so the button should be collapsed.</p>
  
  
  
  <pre><code>private void ViewPage_Loaded(object sender, RoutedEventArgs e)
  {
     this.IsTeamLeader = false;
  }
  </code></pre>
  
  <p>But this won't work. No matter which value the <code>IsTeamLeader</code> property has on startup the button is always visible.</p>
  
  <p>So can you please help me and give me a hint where I did the mistake? Is there a problem with the <code>BooleanToVisiblityConverter</code> or is there something wrong with my dependency property implementation? Or what?</p>
  
  <p>Thank you!</p>