How do I remove the Adorner from an element ?

Platform: WPF| Category: Adorners

1. Call the static method ‘GetAdornerLayer()’, to get the AdornerLayer associated with the UIElement.

2. Call the ‘Add()’ method to bind the Adorner to the target UIElement.

[C#]

        AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(myTextBox);
        adornerLayer.Remove(new ControlAdorner(myTextBox));

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.