Content Loaded Event for FlowDocumentReader


  • Hey all, see if you can figure this one out:

    I am dynamically building custom content blocks and adding them to a FlowDocumentReader at runtime. I then need to loop back through them and selectively change the background color of the blocks (highlight) based on a preferences file that is persisted to disk. I can do these things just fine and the app works great except that I'm having a problem when the number of blocks added to the reader is so great that the reader has not completely loaded the blocks yet when the code is executed to highlight them. Obviously, there is an Object Reference error because the FlowDocumentReader is working asynchronously to finish loading all of its content and the block to highlight has not been loaded yet.

    Is there an event of some sort that will tell me when the FlowDocumentReader has completely loaded all of its content?



    Monday, October 09, 2006 3:41 AM

All replies

  • did you try getting the FlowDocument and use the loaded Event?
    Monday, October 09, 2006 1:36 PM
  • I didn't try using the loaded event because I'm pretty sure that event is for the load complete of the control itself, not the control's document load complete.

    I suppose I could try it though.

    Thanks Lee,


    Monday, October 09, 2006 6:50 PM