Invalidate() public méthode

On Dispose, call invalidate on the root's site.
public Invalidate ( Rectangle rect ) : void
rect System.Drawing.Rectangle
Résultat void
Exemple #1
0
 /// <summary>
 /// The root box handles the overall paint.
 /// </summary>
 /// <param name="vg"></param>
 /// <param name="ptrans"></param>
 public void Paint(IVwGraphics vg, PaintTransform ptrans)
 {
     if (m_layoutCallbacks != null)
     {
         // In a state where we can't paint. Arrange for an invalidate AFTER the dangerous operation is over,
         // so what needs painting eventually does get painted.
         var bounds = Bounds;
         bounds.Inflate(10, 10);
         m_layoutCallbacks.Invalidate(bounds);
         return;
     }
     // First we paint the overall background. This basically covers everything but text.
     PaintBackground(vg, ptrans);
     // Then the text.
     PaintForeground(vg, ptrans);
     // And finally the selection.
     if (Selection != null && m_selectionShowing)
     {
         if (Selection.IsValid)
         {
             Selection.Draw(vg, ptrans);
         }
         else
         {
             Selection = null;
         }
     }
 }