blob: 35e602544003766063e844ed4daae534add9281e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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.
|