title: How to bind visibility property
body: <p>The XAML code is as follows:</p>
  
  <pre><code>&lt;Helper:BooleanVisibilityValueConverter x:Key="BoolToVisible" /&gt;
     &lt;Control x:Name="ResizeDecorator" MouseMove="ResizeDecorator_MouseMove" Template=" {StaticResource ResizeDecoratorTemplate}" Visibility="{Binding IsButtonVisible,Converter= {StaticResource ResourceKey=BoolToVisible},RelativeSource={RelativeSource  TemplatedParent}}" /&gt;
  &lt;Helper:BooleanVisibilityValueConverter x:Key="BoolToVisible" /&gt;
  &lt;Control x:Name="ResizeDecorator"  MouseMove="ResizeDecorator_MouseMove" Template="{StaticResource ResizeDecoratorTemplate}" Visibility="{Binding IsButtonVisible,Converter={StaticResource ResourceKey=BoolToVisible},RelativeSource={RelativeSource TemplatedParent}}"  /&gt;
  </code></pre>
  
  <p>The ViewModel code:</p>
  
  <pre><code>private bool _IsButtonVisible;
  public bool IsButtonVisible
  {
      get { return _IsButtonVisible; }
      set
      {
          _IsButtonVisible = value;
          NotifyPropertyChanged("IsButtonVisible");
      }
  }
  
  IsButtonVisible =false;
  </code></pre>
  
  <p>Can anyone tell me where am I going wrong?</p>