Uredi

Deli z drugimi prek


UIElement.InvalidateVisual Method

Definition

Invalidates the rendering of the element, and forces a complete new layout pass. OnRender(DrawingContext) is called after the layout cycle is completed.

public:
 void InvalidateVisual();
public void InvalidateVisual ();
member this.InvalidateVisual : unit -> unit
Public Sub InvalidateVisual ()

Remarks

This method calls InvalidateArrange internally.

This method is not generally called from your application code. The WPF framework-level layout system does its own handling of changes in the visual tree of an element, and would be calling the equivalent of this method when necessary already. Calling this method is necessary only for advanced scenarios. One such advanced scenario is if you are creating a PropertyChangedCallback for a dependency property that is not on a Freezable or FrameworkElement derived class that still influences the layout when it changes.

Applies to

See also