Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Export xamDataChart to image from view model
posted

Hello,

I have a charting application that needs to run in two modes. In the first main mode we will generate xamDataCharts which can get exported as images. That path works. However, I want to also run the application from the command line and have it generate the same charts. My plan is to have the code generate XamDataCharts and then export them. However when I tried that I got an empty image.

I am guessing that rendering the chart, or maybe initializing it in the xaml is performing extra steps that I am missing. Do you have any advice on how to properly initiate the charts so that they will form the same images as if they were in xaml?

Attached is a heavily simplified example.

Thanks,

Mike

ToImage.zip