This documentation is archived and is not being maintained.

Adorner.Invalidate Method

Forces the BehaviorService to refresh its adorner window.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Invalidate() Forces the BehaviorService to refresh its adorner window.
Public method Invalidate(Rectangle) Forces the BehaviorService to refresh its adorner window within the given Rectangle.
Public method Invalidate(Region) Forces the BehaviorService to refresh its adorner window within the given Region.
Top

The following example demonstrates how to force an Adorner window to repaint. For a full code listing, see How to: Extend the Appearance and Behavior of Controls in Design Mode.


void changeService_ComponentChanged(object sender, ComponentChangedEventArgs e)
{
    if (object.ReferenceEquals(
        e.Component, 
        this.relatedControl))
    {
        if (e.Member.Name == "Margin" ||
            e.Member.Name == "Padding" )
        {
            this.marginAndPaddingAdorner.Invalidate();
        }
    }
}


Show: