title: How can I set the value using xaml only in WPF's Binding?
body: <p>I have a custom Binding like this: </p>
  
  <pre><code>public class MyBinding : Binding
  {
      public class ValueConverter : IValueConverter
      {
          public ValueConverter(string A)
          {
              this.A = A;
          }
          public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
          {
              if ((bool)value == true)
              {
                  return A;
              }
              else
              {
                  return "another value";
              }
          }
  
          public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
          {
              throw new NotImplementedException();
          }
          public string A
          {
              get;
              set;
          }
  
      }
  
      public string A
      {
          get;
          set;
      }
  
      public MyBinding()
      {
          this.Converter = new ValueConverter(A);
      }
  }
  </code></pre>
  
  <p>and the XAML(IsEnable is a property of class MainWindow):</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication5.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:WpfApplication5"
      Title="MainWindow" Height="350" Width="525"&gt;
  &lt;Grid&gt;
      &lt;TextBlock&gt;
          &lt;TextBlock.Text&gt;
              &lt;local:MyBinding A="value" Path="IsEnable" RelativeSource="{RelativeSource AncestorType=Window, Mode=FindAncestor}"/&gt;
          &lt;/TextBlock.Text&gt;
      &lt;/TextBlock&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am willing to make the <code>TextBlock</code> show A when <code>IsEnable</code> is true and show <code>another value</code> when <code>IsEnable</code> is false.</p>
  
  <p>But Whatever I do, I can not set value of A in the xaml. It always be <code>null</code> when I debug in. </p>
  
  <p>Did I wrong in someplace?</p>