1
Vote

LogicalTreeHelper.GetChildren logic

description

The method GetChildren(element) of the class LogicalTreeHelper returns a string instead a DependencyObject sometimes. This behavior results errors on ValidatedContent class, more specific on OnValidatedContentLoaded and Validate methods. The return must be check. Ex:
 
            foreach (object obj in LogicalTreeHelper.GetChildren(element))
            {
                DependencyObject childElement = obj as DependencyObject;
 
                if (childElement != null)
                {
                    elementQueue.Enqueue(childElement);
                }
            }

comments