Browse Source

Hide obsolete properties in the grid.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/wpfdesigner@5990 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Kumar Devvrat 15 years ago
parent
commit
05fa1b13f0
  1. 3
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs

3
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs

@ -51,6 +51,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -51,6 +51,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
foreach (PropertyDescriptor p in TypeDescriptor.GetProperties(forType)) {
if (!p.IsBrowsable) continue;
if (p.IsReadOnly) continue;
if (p.Attributes.OfType<ObsoleteAttribute>().Count()!=0) continue;
if (p.Name.Contains(".")) continue;
yield return p;
}
@ -63,6 +64,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -63,6 +64,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
{
foreach (EventDescriptor e in TypeDescriptor.GetEvents(forType)) {
if (!e.IsBrowsable) continue;
if (e.Attributes.OfType<ObsoleteAttribute>().Count()!=0) continue;
if (e.Name.Contains(".")) continue;
yield return e;
}
@ -76,6 +78,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -76,6 +78,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
foreach(PropertyDescriptor p in TypeDescriptor.GetProperties(element)){
if (!p.IsBrowsable) continue;
if (p.IsReadOnly) continue;
if (p.Attributes.OfType<ObsoleteAttribute>().Count()!=0) continue;
yield return p;
}
}

Loading…
Cancel
Save