WPF Questions

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
User avatar
blakeadkins
Posts: 44
Joined: Tue Feb 25, 2014 7:49 pm

WPF Questions

Post by blakeadkins » Mon Dec 29, 2014 7:19 pm

I have a couple questions on the WPF rendering.

1) If I'm binding several properties on a chart, do I need to call BeginUpdate before any property change? If I don't call BeginUpdate, so LightningCharts do a complete refresh of the chart?

2) If chart is not visible (i.e. on a window in the background that has several windows on top of it) and I call EndUpdate, does it render and repaint the chart? Or does the chart not repaint because it isn't visible.

Thanks!

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: WPF Questions

Post by ArctionPasi » Tue Dec 30, 2014 11:23 am

1) If BeginUpdate is not called before setting a property/properties, it makes a refresh on every property change. Excluding properties that don't effect the visual appearance, they don't refresh it.

2) If the chart is not visible (beneath other window), and you are pushing data to it, or changing properties, it still refreshes and by observing with GPU-Z utility the overhead is similar than if the chart window was on front.

You can set the chart into 'mute' state with BeginUpdate call, when you know that the chart will be hidden e.g. when setting to TabControl page that is not active. When the chart becomes visible again, call EndUpdate and the nesting updates counter gets a pair with the BeginUpdate you called and the chart refreshes.
LightningChart Support Team, PT

Post Reply