I'm using data binding to change multiple properties of a chart at the same time. Unfortunately, I see them changing one by one instead of all at once. In code I would have surrounded the changes with BeginUpdate and EndUpdate, but I can't because I'm using data binding. Any suggestions on how to solve this?
Thanks,
Joost
Begin/EndUpdate when using data binding?
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Begin/EndUpdate when using data binding?
We have thought about how to achieve that functionality, but haven't come up with a working solution.
LightningChart Support Team, PT
Re: Begin/EndUpdate when using data binding?
I found a solution that fulfills most of my needs regarding begin/end update and data binding:
This works because the DataBind phase is executed with a higher priority than the Render phase.
Hope this helps other users!
Cheers,
Joost
Code: Select all
chart.BeginUpdate();
<perform update(s) on view model(s)>
chart.Dispatcher.BeginInvoke(new Action(() => chart.EndUpdate()), DispatcherPriority.Render);
Hope this helps other users!
Cheers,
Joost