WPF Customized Find Control for FlowDocuments

There are a couple of controls in the WPF that can be used to load and display FlowDocuments. These controls have a Find feature that allows the users to find a word or a phrase in the FlowDocuments. Although, the find feature is very nice, but unfortunately, Microsoft defines it as an internal control and one can’t customize it. In this paper, I developed an out of the box Find control that is customizable and can be used anywhere.

ast month, me and my colleague (Afshin Khashei) worked on a document management system that deals with lots of FlowDocuments. Flow documents are designed to optimize viewing and readability. Rather than being set to one predefined layout, flow documents dynamically adjust and reflow their content based on run-time variables such as window size, device resolution, and optional user preferences. FlowDocument Hosts and formats flow content with advanced document features, such as pagination and columns [MSDN]. The Blocking parts of a FlowDocument are instances of the Block class which has many derivations such as Figure, Floater, List, ListItem, Section and Table. Alongside the Block class there is another class called Inline. Each inline represents a piece of text or a special inline-level format for its child inlines. Run, Span, Bold, and Underline are Examples of Inline classes. Block level and Inline Level classes together provide a consistent way for generating custom flow documents.

read more

No Comments

Post Reply