Can i clean the adorner layer?

I might have misunderstood the concept of adorner layers in WPF, but I managed to add a TextBlock to StackPanel adorner layer.

How to clean the adorner layer? So the StackPanel no longer has a TextBlock in this adorner layer?

+8
source share
2 answers

no, you have to add or remove the added layer

https://github.com/TheCamel/ArchX/blob/master/ArchX.Controls/Ruler/Ruler.cs

 if (after) layer.Add(GuideAdorner); else layer.Remove(GuideAdorner); 
0
source

Source: https://habr.com/ru/post/905508/


All Articles