Files to look at:
- CustomObjects.cs (VB: CustomObjects.vb)
- Form1.cs (VB: Form1.vb)
Starting with version 15.2, we聽split layout calculation operations into several threads to improve the typical performance of a Scheduling application. Correspondingly, in a common scenario,聽the聽InitAppointmentImages聽event (as well as聽InitAppointmentDisplayText) can be raised from聽another thread than the one where the SchedulerControl instance was created. Accessing the SchedulerControl (SchedulerStorage) instance directly in the聽InitAppointmentImages event when the聽OptionsBehavior.UseAsyncMode聽property is true can result in "cross-thread" exceptions.
Correspondingly, to avoid the聽"cross-thread" issues in a scenario when the聽OptionsBehavior.UseAsyncMode聽property is true, you need to avoid direct accessing the SchedulerControl or SchedulerStorage instance in the mentioned event handlers.
To implement it, we recommend storing聽all the required information to calculate custom appointment images and the display text as custom appointment fields, to operate only with the current appointment instance without accessing an underlying source object.
This example demonstrates how it can be achieved.
(you will be redirected to DevExpress.com to submit your response)