|
|
@ -88,10 +88,15 @@ namespace ICSharpCode.WpfDesign.AddIn |
|
|
|
object[] attributes = item.ComponentType.GetCustomAttributes(typeof(DefaultEventAttribute), true); |
|
|
|
object[] attributes = item.ComponentType.GetCustomAttributes(typeof(DefaultEventAttribute), true); |
|
|
|
if (attributes.Length == 1) { |
|
|
|
if (attributes.Length == 1) { |
|
|
|
DefaultEventAttribute dae = (DefaultEventAttribute)attributes[0]; |
|
|
|
DefaultEventAttribute dae = (DefaultEventAttribute)attributes[0]; |
|
|
|
DesignItemProperty property = item.Properties.GetProperty(dae.Name); |
|
|
|
// To filter controls derived from ItemsControl
|
|
|
|
if (property != null && property.IsEvent) { |
|
|
|
if (dae.Name != "OnItemsChanged") |
|
|
|
return property; |
|
|
|
{ |
|
|
|
} |
|
|
|
DesignItemProperty property = item.Properties.GetProperty(dae.Name); |
|
|
|
|
|
|
|
if (property != null && property.IsEvent) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return property; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|