fixeddocument

WPF - Auto Line Number for FlowDocument?

喜夏-厌秋 提交于 2019-11-27 02:47:01
问题 I'm just starting on a contract generation routine for my current project and one of the requirements is that each of the lines in the contract must be numbered. The number should be located in the left margin with a vertical rule separating the numbering from the rest of the document content. I'm pretty sure I can tackle this requirement with a FixedDocument, but it won't be fun. Is there anyway I can do this with a FlowDocument instead? 回答1: You can do this with a FixedDocument quite easily