Over the weekend I had a play with the new .NET framework source code release which now allows you to debug into framework classes as part of your standard debugging. The source gives a good insight into how classes have been built and can often help in understanding their behaviour. Also it comes with the original comments which can be quite enlightening. You can only do this from visual studio 2008 and most of the .net framework including WPF can be debugged.
Couple of funny comments in the code that I found from initial play below.
Optimistic developer
// Note: This doesn't work on Win9x. We can implement this
// functionality on Win9x by writing a 16 bit DLL and
// calling the LAN Manager method NetWkstaGetInfo(). See
// We don't have the time to implement this in V1. Hopefully
// by the time V2 rolls around, everyone will run Windows XP.
Hacking is part and parcel of the MS Job. J
// HACK HACK HACK - when we change RightToLeft, we need to change the scrollbar thumb.
// We can't do that until after the control has been created, and all the items added
// back. This is because the system control won't know the nMin and nMax of the scroll
// bar until the items are added. So in RightToLeftChanged, we set a flag that indicates
// that we want to set the scroll position. In OnHandleCreated we check this flag,
// and if set, we BeginInvoke. We have to BeginInvoke since we have to wait until the items
// are added. We only want to do this when RightToLeft changes thus the flags
// STATE2_HAVEINVOKED and STATE2_SETSCROLLPOS. Otherwise we would do this on each