Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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();
        }
    }
}


Community Additions

ADD
Show:
© 2015 Microsoft