Пример #1
0
 private void UserCtrl_Resize(object sender, EventArgs e)
 {
     // graphics context may not have been built yet, eg when resize occurs during parent's initialization
     BufferedGraphicsContext.Do(_ =>
     {
         CreateBufferGraphics();
         RenderToBuffer();
         //raises OnPaint()
         Refresh();
     });
 }