I have a FlowDocument I want to save, and later load.
I think I can do this with XamlWriter.Save() and XamlReader.Load().
It works, but it takes a long time. The time it takes is the time it takes, I guess, but to make the UI more simpatico, I'd like to present a progressbar showing the save progress.
But how can I monitor the progress of a XamlWriter.Save()
?
One idea, for saving, is to create a thin wrapper class around the destination stream; it can then track progress by counting how many bytes get sent through the Write() method. This will work but it's sort of an open-ended progress, since I don't have a way to figure % complete.
I suppose I could do something similar on the reading side.
anyone done this? What's a good way to track progress of XamlWriter.Save() ?