index > Windows Presentation Foundation ("Avalon") > Content Loaded Event for FlowDocumentReader

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?

Thanks!

Corey

Corgalore
did you try getting the FlowDocument and use the loaded Event?
lee d

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,

Corey

Corgalore
reply 3

You can use google to search for other answers

 

More Articles

• How to exit a WPF application
• Textblock animation in RC1
• Writing a string property value as a CDATA node with XamlWriter ?
• What is "best practise" for databinding custom controls...
• Cannot set Name attribute value
• about WindowsFormsHost
• Yet Another Binding Question
• Application.LoadComponent() problems June CTP -> RC1
• ListBox not Displaying Feeds Help Please(XamlParseException!!!)
• Will WPF *EVER* work under W2K?
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Adding a footer to a GridView?
• How to control line breaking in TextBloc
• Bug Fixes
• Executing Commands from *any* event
• OnChildAdded/removed event
• xbap security issue with images
• Is it possible to create a seperation li
• .NET 3.0 and Expression Interactive Desi
• HOw to add textbox columns in Datagrid v
• Loading complete xaml files at runtime.
• XamlWriter : Does NameScope.RegisterName
• Problem with Storyboard.TargetName and r
• PrintTicket.PageOrientation does not hav
• Animating a canvas?
• How to bind values to the Grid in WPF?

Hot Articles

• Using an image as a repeating background
• Doubt Regarding RichTextBox !!
• Managing Navigation Exceptions
• BitmapImage and transparent pixels
• DataContext = this ?
• Resource Dictionary "Adding Stroke/
• Windows Vista Explorer-like application
• Selecting .NET Framework 3.0 as prerequi
• Xaml Error when using Frame in a Window
• Missing references in basic WPF example
• How to remove control box from Window?
• How to do xaml to change the button's im
• What's equivalent in WPF for "Appli
• export to image with black block
• PageFunction Base Class

Recommend Articles

• Unable to animate custom control object'
• WinFX Runtime Version 3.0.4119.1
• Problems with Ink Analysis
• CAD with WPF: "Capture" Extern
• how to access resource directory from c#
• ShowDialog question
• Threading suggestions by experts
• Pass mouseevents to Inkcanvas childobjects
• What's the recommended way to save an bi
• How to create irregular window from PNG
• Rounded edges cube mesh
• WPF messageBox
• GridViewColumnHeader: Prevent column reo
• color space?
• XAML RSS Reader problem