Exemplo n.º 1
0
 protected virtual void OnChanged([CallerMemberName] string p = "")
 {
     if (Application.Current.Dispatcher.CheckAccess())
     {
         PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(p));
     }
     else
     {
         var del = new OnChangedDelegate(OnChanged);
         Application.Current.Dispatcher.Invoke(del, new[] { p });
     }
 }
Exemplo n.º 2
0
 public void RegisterOnChangedHandler(OnChangedDelegate del)
 {
     onChangedHandlers += del;
 }