title: How to create a binding in code and make a notification from property?
body: <p>A View contains a couple of buttons.
  In a ViewModel "IsShiftLock" property resides and a binding created dynamically.</p>
  
  <pre><code> public bool IsShiftLock {
          get { return _isShiftLock; }
          set {
              if (value != _isShiftLock) {
                  _isShiftLock = value;
                  Notify("IsShiftLock");                   
              }
          }
      }
  </code></pre>
  
  <p>Notify is a method in a BaseViewModel.</p>
  
  <pre><code>public abstract class BaseViewModel : INotifyPropertyChanged
  {
     public event PropertyChangedEventHandler PropertyChanged;
  
     public void Notify(string sPropertyName)
  {
    PropertyChangedEventHandler changedEventHandler = this.PropertyChanged;
    if (changedEventHandler == null)
      return;
    changedEventHandler((object) this, new PropertyChangedEventArgs(sPropertyName));
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>       Binding b2 = new Binding {
                      Source = this,
                      Path = new PropertyPath("IsShiftLock"),
                      Converter = new ShiftLockToTextConverter()
                  };
                  b2.Mode = BindingMode.OneWay;
                  curKeyView.Button.SetBinding(ContentControl.ContentProperty, b2);
  </code></pre>
  
  <p>IsShiftLock changes properly, but converter invokation occurs only once.
  As I understand, binding should be properly notified of changes. How to accomplish that?</p>
  
  <p><em><strong>update 1:</em></strong></p>
  
  <p>View side:</p>
  
  <pre><code>private readonly KeyboardViewModel viewModel;
  public static KeyboardViewModel ViewModelInstance;
  
      public VirtualKeyboard() {             
              Loaded += OnLoaded;
              InitializeComponent();
  
              viewModel = new KeyboardViewModel();
              DataContext = viewModel;
  
              ViewModelInstance = viewModel;
      }
  </code></pre>