Esempio n. 1
0
        /// <summary>
        /// Event handler for AtdlControl validation event.
        /// </summary>
        /// <param name="sender">AtdlControl that raised this event.</param>
        /// <param name="e">Event argument.</param>
        public void OnValidationStateChanged(object sender, ValidationStateChangedEventArgs e)
        {
            AtdlControl control = sender as AtdlControl;

            if (control == null)
            {
                return;
            }

            if (!e.IsValid)
            {
                IsValid = false;

                NotifyPropertyChanged("IsValid");
            }
            else
            {
                RefreshControlIsValid(control);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Refreshes the validity state of the supplied control.
        /// </summary>
        /// <param name="source"></param>
        public void RefreshControlIsValid(AtdlControl source)
        {
            IsValid = source.IsValid;

            NotifyPropertyChanged("IsValid");
        }