Beispiel #1
0
 protected override void UpdateDataValidation(AvaloniaProperty property, BindingNotification status)
 {
     if (property == TextProperty)
     {
         DataValidationErrors.SetError(this, status.Error);
     }
 }
Beispiel #2
0
        protected override void OnPropertyChanged <T>(AvaloniaPropertyChangedEventArgs <T> change)
        {
            base.OnPropertyChanged(change);

            if (change.Property == SelectedDateProperty)
            {
                DataValidationErrors.SetError(this, change.NewValue.Error);
            }
        }
Beispiel #3
0
        /// <inheritdoc/>
        protected override void UpdateDataValidation(AvaloniaProperty property, BindingValueType state, Exception?error)
        {
            if (property == SelectedDateProperty)
            {
                DataValidationErrors.SetError(this, error);
            }

            base.UpdateDataValidation(property, state, error);
        }
Beispiel #4
0
        protected override void OnPropertyChanged <T>(
            AvaloniaProperty <T> property,
            Optional <T> oldValue,
            BindingValue <T> newValue,
            BindingPriority priority)
        {
            base.OnPropertyChanged(property, oldValue, newValue, priority);

            if (property == SelectedDateProperty)
            {
                DataValidationErrors.SetError(this, newValue.Error);
            }
        }