The context is passed from the caller, in this case the PropertyGrid -
but you shouldn't need to have a custom context unless you are writing
your own UI implementation. Normally, the trick is to look at the
context's Instance and PropertyDescriptor (if they are set) which gives
you the object and property being processed. A typical use-case would be
to look at the PropertyDescriptor for metadata (attributes etc).
If you let me know what you need to do in more detail I might be able to
help more (I'm painfully familiar with System.ComponentModel).
Note also that some simpler data-binding implementations (like
DataGridView) pass a null context; you should be fine from PropertyGrid,
though.
Marc