Hi,
is there an Event I can hook into, when the chart is defenetly rendered on the screen? I'm loading external data to the chart and want to render the UIElement afterwards (like a Screenshot from a specific part of the program-window).
I tried to use chart.AfterRendering, but then I always get an empty chart, because the points are not fully rendered. My series use CustomLinePointColoringAndShaping, which delays rendering a bit.
Event, when chart is defenetly renderd
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Event, when chart is defenetly renderd
AfterRendering is fired when LightningChart contents has been updated. By browsing the internet, I found it is a general problem in WPF framework that there's no telling when the WPF UI actually updates and when it's safe to make a capture from continuously updating WPF window.
In AfterRendering event handler it's possible to store the chart contents to a file, simply by calling chart.SaveToFile("filename.png") method.
You may want to experiment BeforeRendering event handler as well, and try if your code makes a proper capture there.
In AfterRendering event handler it's possible to store the chart contents to a file, simply by calling chart.SaveToFile("filename.png") method.
You may want to experiment BeforeRendering event handler as well, and try if your code makes a proper capture there.
LightningChart Support Team, PT
Re: Event, when chart is defenetly renderd
Hi Pasi,
thanks for your effort. That's what I also found so I was hoping LC would provide perhaps an Event where I could bypass this problem. I'll try another solution, because I try to save a WPF-Grid containing multiple LightningCharts.
thanks for your effort. That's what I also found so I was hoping LC would provide perhaps an Event where I could bypass this problem. I'll try another solution, because I try to save a WPF-Grid containing multiple LightningCharts.