MapSuiteGisEditor/GisEditorInfrastructure/Plugins/Styles/StyleBuilder/StyleBuilderWindow.xaml.cs
/// <summary>
/// Determines whether the specified obj is valid.
/// </summary>
/// <param name="obj">The obj.</param>
/// <returns>
///   <c>true</c> if the specified obj is valid; otherwise, <c>false</c>.
/// </returns>
Determines whether the specified obj is valid.
Determines whether the specified obj is valid .
private bool IsValid(DependencyObject obj)
        {
            if (Validation.GetHasError(obj))
            {
                return false;
            }
            else
            {
                var childrenCount = VisualTreeHelper.GetChildrenCount(obj);
                bool valid = true;
                for (int i = 0; i < childrenCount; i++)
                {
                    if (!IsValid(VisualTreeHelper.GetChild(obj, i)))
                    {
                        valid = false;
                        break;
                    }
                }
                return valid;
            }
        }
private bool IsValid ( DependencyObject obj ) { if ( Validation . GetHasError ( obj ) ) { return false ; } else { var childrenCount = VisualTreeHelper . GetChildrenCount ( obj ) ; bool valid = true ; for ( int i = 0 ; i < childrenCount ; i ++ ) { if ( ! IsValid ( VisualTreeHelper . GetChild ( obj , i ) ) ) { valid = false ; break ; } } return valid ; } }
Determines whether the specified obj is valid.
Determines whether the specified obj is valid .
None
obj
DependencyObject
None