I have an ItemsControl
in a ScrollViewer
. The items in the ItemsControl
are expanded to a DataTemplate
which basically consists of an Adorner
.
Now the problem is, when scrolling, the Visual Children of the Adorner
are visible outside the ScrollViewer
. Lets say I scroll from the Horizontal Offset 0 to 100, the Visual Children of the Adorner
move to the left and are visible next to the ScrollViewer
, although they should be hidden. Setting ClipToBounds
on the ItemsControl
or the ScrollViewer
does not work.
I understand, that Adorner
are rendered above all elements z-order wise, but they really shouldn't be visible in such cases as with the ScrollViewer
. The adorned Element
by the way behaves like expected and is not visible through the ScrollViewer
.
Is there any easy way to "clip" the Adorner
s, so that they are only visible in the visible scroll area?
Thanks, Andrej