5

One of the coolest features I've seen in help viewers is the ability to hide inherited members so you can focus on only what that particular subclass offers. A good example of this is here...

http://james.newtonking.com/projects/json/help/html/T_Newtonsoft_Json_JsonConvert.htm

Actually, that page has various options for how to show the help, not just hiding inherited members.

Now online MSDN has a habit of just throwing everything under the sun at you meaning trying to figure out what a subclass has added, let alone getting to it requires tons of scanning and even more scrolling.

That said, is there any way, local or online, to enable those or similar features? Has anyone made an external or third-party help viewer that does this or something similar?

(Note: I'm not really sure if this is for SO since it's not a programming thing, but it is sort of an IDE-related thing so I figured I'd gamble and put it here.)

Mark

Mark A. Donohoe
  • 23,825
  • 17
  • 116
  • 235

2 Answers2

2

Hiding inherited items is one thing I used to miss in the Lightweight style online MSDN docs.

Fortunately, it can be easily solved by using a litte bit of in browser javascript. See How to hide inherited members on MSDN pages for details.

You should be able to expand the used principle to hide any information you need (eg. you could use the icons to tell apart the static members, methods, properties and so on...).

Hrvoje Prgeša
  • 2,021
  • 5
  • 21
  • 36
  • THANK YOU, THANK YOU, THANK YOU!!!! Good GOD that's cool! I think I may even write my own Chrome extension to allow you to choose which base classes you still want to show. If I do, I'll post it here. – Mark A. Donohoe May 22 '11 at 22:16
  • It's amazing that the MSDN docs still, 2 years later, have no "hide inherited" options. I agree with MarqueIV. THANK YOU THANK YOU THANK YOU. It should be noted that this javascript will not work with the new [Dev Center - Windows Store Apps documentation](http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.textblock.aspx), as the `data` tag is not present. The text `Inherited From` verbiage is present, so it should still be possible to hide the inherited members. – cod3monk3y Apr 22 '13 at 03:36
1

Updated answer for 2016:

Create a bookmark in a modern browser with the following javascript snippet as the URL:

javascript:var trs=document.getElementsByTagName('tr');var l=trs.length;for (var i=0; i<l; i++) {  var tr=trs[i];  if (tr.innerHTML.indexOf('(Inherited from ')>-1)  tr.style.display=tr.style.display=='none'?'':'none'; }; void(0);

Clicking this bookmark while on an MSDN class documentation page will toggle all the inherited members on and off.

The javascript is just looking through all of the table rows ('tr') on the page, finding any which contain the string '(Inherited from ', and setting their display style (visibility) to 'none'. That search string seems to cover every instance of a member being inherited.

Kevin Gallahan
  • 1,367
  • 8
  • 9