Tig 9 tháng trước cách đây
mục cha
commit
53708fac9e
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      docfx/docs/drawing.md

+ 4 - 0
docfx/docs/drawing.md

@@ -37,6 +37,10 @@ The @Terminal.Gui.Application MainLoop will iterate over all Views in an applica
 
 Each of these steps can be overridden by developers using the standard [Terminal.Gui cancellable event pattern](events.md). For example, the base @Terminal.Gui.View always clears the viewport. To override this, a subclass can override @Terminal.Gui.View.OnClearingViewport to simply return `true`. Or, a user of `View` can subscribe to the @Terminal.Gui.View.ClearingViewport event and set the `Cancel` argument to `true`.
 
+### Declaring that drawing is needed
+
+If a View need to redraw because something changed within it's Content Area it can call @Terminal.Gui.View.SetNeedsDisplay. If a View needs to be redrawn because something has changed the size of the Viewport, it can call @Terminal.Gui.View.SetNeedsLayout.
+
 ## Coordinate System for Drawing
 
 The @Terminal.Gui.View draw APIs all take coordinates specified in *Viewport-Relative* coordinates. That is, `0, 0` is the top-left cell visible to the user.