What would be the best approach to display footnotes for FlowDocument content in a FlowDocumentPageViewer?
My first thought was to have the contents of the footnote follow immediately after the footnote anchor within the FlowDocument, with the footnote content formatted as a Figure with VerticalAnchor set to PageBottom.
This works great, but when there are multiple footnotes on a page, the footnotes are stacked in reverse order, i.e. the first footnote is all the way on the bottom, with subsequent footnotes being stacked on top of it.
Another difficulty with this approach is that long footnotes will not be allowed to span pages, as Figure does not allow that.
A more extreme approach would be to do the same in reverse - format the regular text as stacked figures with VerticalAnchor set to PageTop, and let the footnotes flow on the bottom. However, paragraphs (which tend to be longer than footnotes) will now not span pages.
What other approaches can I try?
Ideally I would like to display the footnotes as they would appear in print (i.e. on the bottom of the page they are relevant to), but I am open to other approaches.
This is for a reader app for specialized academic content, where long and frequent footnotes are the norm and should be part of the reading experience. For this reason I do not want to use endnotes, and prefer footnotes displayed on the bottom of each page.