My controls .ItemContainerGenerator.Status is NotStarted. How do I tell it to start now and wait until it is completed?
You may want to start the generator manually if you doing some syncronous operation - I had to generate the result view to meassure it before chunking it up on pages.
IItemContainerGenerator generator = (child as ListContent).ItemContainerGenerator;
GeneratorPosition position = generator.GeneratorPositionFromIndex(0);
using (generator.StartAt(position, GeneratorDirection.Forward,true))
{
foreach (object o in (child as ListContent).Items)
{
DependencyObject dp = generator.GenerateNext();
generator.PrepareItemContainer(dp);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With