I need to float out some content out of the ListBox
as specified in a DataTemplate
for an ListBox.ItemTemplate
. I am using Rende
The ListBoxItem
's are getting clipped by the ScrollViewer
in the ListBox
Template. To work around this I think you'll need to remove the ScrollViewer
from the Template and if you need scrolling you can wrap the ListBox
in a ScrollViewer
42
Update
The ScrollViewer
in the Template will generate a ScrollContentPresenter
which in turn has the following GetLayoutClip
protected override Geometry GetLayoutClip(Size layoutSlotSize)
{
return new RectangleGeometry(new Rect(base.RenderSize));
}
This class is Sealed so you can't derive from it to override this method. You would have to implement your own ScrollContentPresenter
(e.g MyScrollContentPresenter
) and probably your own ScrollViewer
that uses MyScrollContentPresenter
as well to make this work (and if you return null
in this method I think that some items below the bounds of the ListBox
could become visible as well)