Пример #1
0
 private void OnPropertyErrorsChanged(string p)
 {
     if (ErrorsChanged != null)
     {
         ErrorsChanged.Invoke(this, new DataErrorsChangedEventArgs(p));
     }
 }
 private void RaiseErrorsChanged(string propertyName)
 {
     if (ErrorsChanged != null)
     {
         ErrorsChanged.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
     }
 }
Пример #3
0
 /// <summary>
 /// Fire ErrorsChanged Event for given property and call OnPropertyChanged for property HasErrors.
 /// </summary>
 /// <param name="propertyName">Property name to fire event for</param>
 protected virtual void OnErrorsChanged(string propertyName)
 {
     if (ErrorsChanged != null)
     {
         ErrorsChanged.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
     }
     OnPropertyChanged(nameof(HasErrors));
 }
 /// <summary>
 /// The ErrorChaged handler which will be on each property.
 /// </summary>
 /// <param name="propertyName"></param>
 public void PropertyErrorsChanged(string propertyName)
 {
     if (ErrorsChanged != null)
     {
         var evtargs = new DataErrorsChangedEventArgs(propertyName);
         ErrorsChanged.Invoke(this, evtargs);
     }
 }
Пример #5
0
 private void RefreshErrors()
 {
     if (ErrorsChanged != null)
     {
         var properties = this.GetType().GetProperties();
         foreach (var p in properties)
         {
             ErrorsChanged.Invoke(this, new DataErrorsChangedEventArgs(p.Name));
         }
     }
 }
Пример #6
0
 public void OnErrorsChanged([CallerMemberName] string propertyName = null)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
 }
Пример #7
0
 public BindableBaseWithErrorsContainer()
 {
     ErrorsContainer = new ErrorsContainer <string>(
         x => ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(x)));
 }
Пример #8
0
 public void RaiseErrorChanged(string propertyName)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
 }
Пример #9
0
 protected void OnErrorsChanged(string propertyName)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
     NotifyPropertyChanged(nameof(Errors), nameof(HasErrors));
 }
Пример #10
0
 private void OnErrorsChanged(DataErrorsChangedEventArgs e)
 {
     ErrorsChanged?.Invoke(this, e);
 }
Пример #11
0
 // HELPER FOR RAISING EVENTS PROGRAMATICALLY
 protected void OnErrorsChanged([CallerMemberName] string propertyName = "")
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
 }
 private void ChangedErrorsEvents(object sender, DataErrorsChangedEventArgs e)
 {
     ErrorsChanged?.Invoke(this, e);
     OnPropertyChanged(nameof(CanCreate));
 }
Пример #13
0
 private void OnErrorsChanged(string propertyName)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
 }
Пример #14
0
 private void OnErrorsChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = "")
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
 }
Пример #15
0
 private void RaiseErrorsChanged(string propertyName)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
     SaveCommand.RaiseCanExecuteChanged();
 }
Пример #16
0
 private void OnErrorsChanged(string propertyName)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
     OnPropertyChanged(nameof(DoesNotHaveErrors));
 }
Пример #17
0
 protected void RaiseErrorsChanged(DataErrorsChangedEventArgs args)
 {
     ErrorsChanged?.Invoke(this, args);
     RaisePropertyChanged("HasErrors");
 }
Пример #18
0
 protected void RaiseErrorsChanged(string propertyName)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
     RaisePropertyChanged(nameof(HasErrors));
 }
Пример #19
0
 private void RaiseErrorsChanged([CanBeNull] string propertyName)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
 }
        private void OnCustomUIErrorsChanged(object sender, DataErrorsChangedEventArgs e)
        {
            ErrorsChanged?.Invoke(this, e);

            OnPropertyChanged(nameof(DoesNotHaveErrors));
        }
Пример #21
0
 /// <summary>
 /// Raises the errors changed.
 /// </summary>
 /// <param name="name">The name.</param>
 protected void RaiseErrorsChanged(string name)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(name));
 }
 private void ErrorsChangedHandler(object sender, DataErrorsChangedEventArgs e) => ErrorsChanged.Invoke(sender, e);
 /// <summary>
 /// Raises the ErrorsChanged event.
 /// </summary>
 /// <param name="propertyName">The name of the property that the error relates to.</param>
 public void OnErrorsChanged(string propertyName) => ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
Пример #24
0
 protected void NotifyErrorsChanged(string nombre)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(nombre));
 }
Пример #25
0
 public void AddError(string propertyName, string errorText)
 {
     _Errors[propertyName] = errorText;
     ErrorsChanged?.Invoke(this, EventArgs.Empty);
 }
Пример #26
0
 /// <summary>
 /// Raises the <see cref="E:ErrorsChanged"/> event.
 /// </summary>
 /// <param name="e">The <see cref="System.ComponentModel.DataErrorsChangedEventArgs"/> instance containing the event data.</param>
 protected virtual void OnErrorsChanged(DataErrorsChangedEventArgs e)
 {
     ErrorsChanged?.Invoke(this, e);
 }
Пример #27
0
 private void OnErrorsChanged(string propertyName)
 {
     this.RaisePropertyChanged(nameof(HasErrors));
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
 }
Пример #28
0
 protected virtual void OnErrorsChanged(object sender, DataErrorsChangedEventArgs e) => ErrorsChanged?.Invoke(sender, e);
Пример #29
0
 protected virtual void OnErrorsChanged(string propertyName)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
 }
Пример #30
0
 protected virtual void OnErrorsChanged(string propertyName)
 {
     ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));// if the ErrorsChanged is not null, invoke it and pass the object and dataerrorchangeeventarges with the propertyName
 }