Example #1
0
 protected void RaiseDisplayChanged(Rectangle oldRect, Rectangle newRect)
 {
     if (DisplayChanged != null)
     {
         BoxDisplayChangeEventArgs e = new BoxDisplayChangeEventArgs(oldRect, newRect);
         DisplayChanged(this, e);
     }
 }
Example #2
0
 private void BoxInvalidation(object sender, BoxDisplayChangeEventArgs e)
 {
     // This is more efficient, but when things extend outside the
     // box bounds this causes things outside to remain on the canvas
     // invalidating the whole canvas is a bit of a hack, so I don't
     // have to save and calculate where the things outside of the box are
     // so I can invalidate it properly
     //RedrawCanvasNoUpdate(e.InvalidatedArea);
     RedrawCanvasNoUpdate(canvas.ClientRectangle);
 }