| 1234567891011121314151617 |
- Random things to look out for when writing or using
- code in Managed.Windows.Forms
- ===========================================================================
- * Don't do anything that causes the <control>.DeviceContext to be recreated
- when inside the drawing routine. Chances are the drawing routine was
- passed <control>.DeviceContext. If an event, for example a resize, that
- causes <control>.DeviceContext to be recreated, is initiated by the
- drawing function, the Graphics object passed to it will no longer be valid.
- Remember that resizing a control results in recreating <control>.DeviceContext
- and this in turn results in destroying the old <control>.DeviceContext.
- * If you're implementing a theme and you need to know about certain states
- of the control, you have to access the internal variables of the control
- to get those states. We should probably expose those vars that are used
- by themes as properties. We'll watch which are needed and 'propertyize'
- them.
|