I have a WPF ListBox that displays images loaded from a local folder, usually somewhere between 1- 300). I'm using a converter in my imageTemplate to make sure and show thumbnails of the images, and not the images in their full size. Even while doing this, it still can take several seconds to load initially. My question is, how do I know in my ListBox when the loading of ListBoxItems Begins/Ends, so that I can set the Mouse Cursor to a waiting status? I'm looking for a way to notify that user that something is happening..
Here is what my ListBox looks like in XAML:
<ListBox SelectionMode="Extended"
ItemsSource="{Binding Path=ImageFiles}"
ItemTemplate="{StaticResource imageTemplate}"
ScrollViewer.CanContentScroll="True"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.IsDeferredScrollingEnabled="False"
VirtualizingStackPanel.VirtualizationMode="Recycling"
x:Name="images">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Thanks!