the flow is going like this:
- I have a grid with data
- The user have to select one row and click on the "Show document" button
- I start a thread that make a call to my backend to receive the PDF document (document can have one or 2 pages)
- When receive is completed, I start another thread to extract each page of the document and transform it into an "Image"
- For each new created image, I add it to my carousel (see code snippet at the end)
- With a 1 page document, fine, no problem.
- With a 2 pages document, I see the first page with is content but the second page was empty and white.
- I scroll the 2nd page outsite the visible area of the carousel and I bring it back into the visible area of the carousel and now, I can see the content of the 2nd page.
private void delayedPdfToImageConverter(object pPdf)
if (mCarouselToUseDuringDocsThread != null && pPdf != null)
var img = pPdf as InterDependencyImage;
img.Image = new Image();
img.Image.Source = img.Frame;
if (mCarouselToUseDuringDocsThread.Items.Count > 0)
if (mCarouselToUseDuringDocsThread.Items.Count == 1)
// Validate if it's a new document.
if (mCarouselToUseDuringDocsThread == SignCtxDocsCarousel)
mSignCtxNewIncomingDoc = true;
mUnsignCtxNewIncomingDoc = true;
// Bring the first received image on top.