internal static FrameworkElement GetTypeEditor(PropertyItem propertyItem , EditorDefinitionCollection editorDefinitions ) { FrameworkElement editor = null; //first check for an attribute editor if (editor == null) { editor = PropertyGridUtilities.GetAttibuteEditor(propertyItem); } //now look for a custom editor based on editor definitions if (editor == null) { editor = PropertyGridUtilities.GetCustomEditor(propertyItem, editorDefinitions); } //guess we have to use the default editor if (editor == null) { editor = PropertyGridUtilities.CreateDefaultEditor(propertyItem); } return(editor); }