2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / class / Managed.Windows.Forms / Notes
1                Random things to look out for when writing or using 
2                        code in Managed.Windows.Forms
3 ===========================================================================
4
5 * Don't do anything that causes the <control>.DeviceContext to be recreated 
6   when inside the drawing routine. Chances are the drawing routine was 
7   passed <control>.DeviceContext. If an event, for example a resize, that
8   causes <control>.DeviceContext to be recreated, is initiated by the 
9   drawing function, the Graphics object passed to it will no longer be valid.
10   Remember that resizing a control results in recreating <control>.DeviceContext
11   and this in turn results in destroying the old <control>.DeviceContext.
12
13 * If you're implementing a theme and you need to know about certain states
14   of the control, you have to access the internal variables of the control
15   to get those states. We should probably expose those vars that are used
16   by themes as properties. We'll watch which are needed and 'propertyize'
17   them.