Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorMatt Ward <matt.ward@microsoft.com>2020-01-04 19:56:00 +0300
committerMatt Ward <ward.matt@gmail.com>2020-01-08 19:10:16 +0300
commitb92b1707465c831edc83f1330e0b015dc1e38be9 (patch)
tree13a08009e0687a2c6c14fda12fd91dee445ca960 /main/src
parentd92256794869bc9f14743eae9017977f883cf559 (diff)
[DesignerSupport] Support CustomTypeDescriptors in new property editor
An object that derives from CustomTypeDescriptor would not show the custom properties in the new native property editor but would with the old property editor. The problem was that the type was being passed to the TypeDescriptor's GetProperties method instead of the object providing the properties. Fixes VSTS #1047889 - New Property Editor does not support CustomTypeDescriptors
Diffstat (limited to 'main/src')
-rw-r--r--main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/NativePropertyEditor/ComponentModelEditorProvider.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/NativePropertyEditor/ComponentModelEditorProvider.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/NativePropertyEditor/ComponentModelEditorProvider.cs
index 5a95a0b4bb..06b595bd09 100644
--- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/NativePropertyEditor/ComponentModelEditorProvider.cs
+++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/NativePropertyEditor/ComponentModelEditorProvider.cs
@@ -96,11 +96,8 @@ namespace MonoDevelop.DesignerSupport
var collection = new List<DescriptorPropertyInfo> ();
foreach (object propertyProvider in providers) {
- //get the current properties for this provider
- var currentType = propertyProvider.GetType ();
-
- //we want all property descriptors for this propertyProvider type
- var propertyDescriptors = System.ComponentModel.TypeDescriptor.GetProperties (currentType);
+ //we want all property descriptors for this propertyProvider
+ var propertyDescriptors = System.ComponentModel.TypeDescriptor.GetProperties (propertyProvider);
foreach (System.ComponentModel.PropertyDescriptor propertyDescriptor in propertyDescriptors) {
if (propertyDescriptor.IsBrowsable) {