Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: PropertyGrid + Custom Editors + ClassLibrary

$
0
0
I think it would be better not to override the custom editor, if the property is read-only. And need to change the function GenerateChildrenEditorElement in class ObjectContainerHelperBase from
            ITypeEditor editor = null;

            if (pd.IsReadOnly)
                editor = new TextBlockEditor();

            if (editor == null)
                editor = pd.CreateAttributeEditor();

            if (editor != null)
                editorElement = editor.ResolveEditor(propertyItem);
to
            ITypeEditor editor = pd.CreateAttributeEditor();

            if (editor == null && pd.IsReadOnly)
                editor = new TextBlockEditor();

            if (editor != null)
                editorElement = editor.ResolveEditor(propertyItem);

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>