Please note I'm not asking how to display an animaiotn while I retrieve data. I want to know how to display an animation while the grid builds i.e. is being databound.
Thanks,
Sam
Hello Sam,
I am just checking if you got this worked out, or you still require any assistance, or clarification on the matter.
If this is what you were looking for please verify the answer so it helps other users as well.
I have been looking into this for you and I have been abel to replicate the same behavior. You are correct, this is because the XamDataGrid needs to create lots of visual elements in the main UI thread. I have been looking for a solution and the only working approach seems to be, creating the animation on another window that would be run on a separate thread. I have created a sample project for your reference (XamDataGridAnimation.zip)
Please let me know if you require any further assistance on the matter.
Hi Stefan, thank you for the example. In our case we are using an animation (spinning wheel) and the animation does not animate (although it becomes visible). I suppose this is because the grid is doing its work on the UI thread??
I have created a sample project for you, where I implemented the functionality you want. Basically I set the Visibility of a Grid with Label to Visible, before the XamDataGrid’s DataSource is set and set it to Collapsed in the FieldLayoutInitialized event. I also used Dispatcher in order to delay the setting of the DataSource, so that the “Loading” Grid can become visible. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
I have a grid that is slow to build because I have to use a converter that is somewhat slow. I want to display an animation while while the grid builds. I tried displaying my animation, then setting the grids datasource, then turning off the animation in the data presenter loaded event . However if I do that and the grid is visible, my animation does not display. If I set the visibility of the grid to collapsed, my animation dispays but the data presenter loaded event does not fire (see http://es.infragistics.com/community/forums/p/72169/365444.aspx#365444).
What to do, please?