<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <linklocation="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
The <seecref="T:Gtk.DrawingArea"/> widget is used for creating custom user interface elements. It's essentially a blank widget; you can draw on <paramrefname="widget"/>->window. After creating a drawing area, the application may want to connect to: <para>
<listtype="bullet">
<item> 1) Mouse and button press signals to respond to input from the user. (Use <seecref="M:Gtk.Widget.AddEvents"/> to enable events you wish to receive).</item>
<item> 2) The <paramrefname="realize"/> signal to take any necessary actions when the widget is instantiated on a particular display. (Create GDK resources in response to this signal.)</item>
<item> 3) The <paramrefname="configure_event"/> signal to take any necessary actions when the widget changes size.</item>
<item> 4) The <paramrefname="expose_event"/> signal to handle redrawing the contents of the widget.</item>
</list>
</para></para>
<para>
Expose events are normally delivered when a drawing area first comes onscreen, or when it's covered by another window and then uncovered (exposed). You can also force an expose event by adding to the "damage region" of the drawing area's window; <seecref="M:Gtk.Widget.QueueDrawArea"/> and <seecref="M:Gdk.Window.InvalidateRect"/> are equally good ways to do this. You'll then get an expose event for the invalid region. See also <seecref="M:Gdk.Pixbuf.RenderToDrawable"/> for drawing a <seecref="T:Gdk.Pixbuf"/>.