I created a list with the Opacity option, whose value is less than 1, and when I anchor a long list, the last elements disappear.
I created a small sample to reproduce the problem.
In the XAML list:
<ListBox x:Name="mainList" ItemsSource="{Binding}" Opacity="0.5"></ListBox>
and it is tied to a long list:
public MainPage()
{
InitializeComponent();
List<int> l = new List<int>();
for (int i = 0; i < 100; i++)
{
l.Add(i);
}
this.DataContext = l;
}
When I execute it, the last element that I see is “87”, there is a place for the rest of the elements below, but it is completely black.
What is the problem?
edit: a colleague told me that this is probably a virtualization problem, since the problem occurs on 87 and there are 29 elements on the screen (the list virtualizes 3 times the number of displayed elements, 3 * 29 = 87). I did the same test with ItemsControl (without virtualization) and the problem is the same.