Hey guys,
I'm in a bit of a pickle. I need to generate charts (off screen so the user doesn't see them) and make these charts save-able. this means setting up the basics and building an image from the loaded chart. I'm talking about a columnseries chart fyi :)
the problem is the built-in ease-in animation. as the chart triggers the "loaded" event I generate an image to save and thus nothing is on the chart yet.
I've tried several things:
- different events that could trigger at the end of render
- delaying the building of the image (but that's not bulletproof)
thus far all my googling searches come up with retemplating the datapoints without the animation (for which I cannot find any reference which is a major problem, the only thing I can find is something concerning a StylePalette, what is nowhere to be found in the assemblies)
any help in this area would be greatly appreciated.
EDIT:
I ported to my main mvvm solution, which made me put this into a custom control. after some collaboration with colleagues we decided the control should produce a series of images (in the form of WriteableBitmaps) from a series of data (lists of lists).
this can be done by just running through the list and rendering what I need. Outside of the visible visualtree of course since the images have to be added to a document which is generated clientside.
this brings me to the next puddle of problems. since I cannot subscribe to the LayoutUpdated event (as it get's triggered by virtually EVERYTHING) I'm a little stuck. There's 1 chart on the control that is constantly loaded with new data, which in turn causes the loaded event only to happen once. I need a solution (event of sorts) that let's me know all data is rendered so I can pull the screenshot and put in some new data...
help?