c# - FlowDocument page load based on the next page button click -
i loading huge document more 25mb flowdocument. , fine, it's taking more cpu or long time during initialization load entire data flowdocument. instead of there way load page dynamically based on next page click in bottom of flowdocument control.
sample code of flow document.
<scrollviewer horizontalalignment="stretch"> <groupbox> <groupbox.header> <textblock text="standard output"></textblock> </groupbox.header> <flowdocument name="flowdocument" columnwidth="999999" background="transparent" iscolumnwidthflexible="true" > <paragraph name="para" background="transparent" textalignment="justify" keeptogether="true"> </paragraph> </flowdocument> </groupbox> </scrollviewer>
i assigning data in code behind file.
code populate flowdocument in code behind file.
para.inlines.add(readdocument()); public void readdocument() { texttodisplay = file.readalltext(@"c:\samplelog.txt"); }
Comments
Post a Comment