Skip to content

Commit

Permalink
Merge pull request #6 from SamirKharchi/Fix-CustomEditor-Support
Browse files Browse the repository at this point in the history
PropertyGrid: Fix custom editor support
  • Loading branch information
SamirKharchi authored May 11, 2021
2 parents 559cb81 + b798e43 commit 14a0c8c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public virtual PropertyEditorBase CreateDefaultEditor(Type type)
: new ReadOnlyTextPropertyEditor();
}

public virtual PropertyEditorBase CreateEditor(Type type) => new ReadOnlyTextPropertyEditor();
public virtual PropertyEditorBase CreateEditor(Type type) => Activator.CreateInstance(type) as PropertyEditorBase ?? new ReadOnlyTextPropertyEditor();

public static bool IsKnownEditorType(Type type)
{
Expand Down

0 comments on commit 14a0c8c

Please sign in to comment.