简体   繁体   中英

WPF BookMark/Indexes support on FixedDocument

In our application that is using Fixed document and richtextbox for text boxes, we're trying to add bookmarks and indexes. For that we're relying on Tag property on runs class to store the metadata ie whether a run is bookmark/index information is stored in the tag property. But these tags gets deleted when we apply some text attributes over a selection having some run with bookmarks and some normal runs without bookmarks/indexes.

Is there any way we could restrict the deletion of our tag data? The tags are user data and it should not be deleted without any notification (callback), do we have any callback to notify such deletions?

We are stuck with tags. Any lead or alternate solution would be appreciated.

Well we have got the solution...We are using our own Derived Run class from the Run class and explicitly putting a new whitespace Run. ANd now it is not able to combine the Runs when same properties are applied on them.

This is not a very efficient solution but its fine for the time being.

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM