title: Visibility converter binding in XAML
body: <p>I have the following converter:</p>
  
  <pre><code>public class MyConverter : IValueConverter
  {
      public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          return Visibility.Hidden;
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          throw new NotImplementedException();
      }
  ...
  </code></pre>
  
  <p>I'm then using this in XAML as follows:</p>
  
  <pre><code>&lt;Resources&gt;
      &lt;conv:MyConverter x:Key="MyValToVisibilityConverter" /&gt;
  &lt;/Resources&gt;
  
  ...
  
  &lt;CheckBox x:Name="MyCheckBox" Content="Should not be visible" 
                  Visibility="{Binding ElementName=Visibility, Converter={StaticResource MyValToVisibilityConverter}}" 
  ...
  </code></pre>
  
  <p>This compiles and runs, and always shows the checkbox as visible.</p>