Browse Source

Add description for attached properties

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/wpfdesigner@6007 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Kumar Devvrat 16 years ago
parent
commit
d6ba95a4b4
  1. 10
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/PropertyDescriptionService.cs

10
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/PropertyDescriptionService.cs

@ -27,6 +27,15 @@ namespace ICSharpCode.WpfDesign.AddIn @@ -27,6 +27,15 @@ namespace ICSharpCode.WpfDesign.AddIn
{
IProjectContent pc = MyTypeFinder.GetProjectContent(file);
if (pc != null) {
// For attached Properties
if (property.DependencyFullName != null && property.Name.Contains(".")) {
IClass c = pc.GetClassByReflectionName(property.DependencyProperty.OwnerType.FullName, true);
if (c != null) {
IMember m = DefaultProjectContent.GetMemberByReflectionName(c, property.DependencyProperty.Name + "Property");
if (m != null)
return CodeCompletionItem.ConvertDocumentation(m.Documentation);
}
} else {
IClass c = pc.GetClassByReflectionName(property.DeclaringType.FullName, true);
if (c != null) {
IMember m = DefaultProjectContent.GetMemberByReflectionName(c, property.Name);
@ -34,6 +43,7 @@ namespace ICSharpCode.WpfDesign.AddIn @@ -34,6 +43,7 @@ namespace ICSharpCode.WpfDesign.AddIn
return CodeCompletionItem.ConvertDocumentation(m.Documentation);
}
}
}
return null;
}
}

Loading…
Cancel
Save