开发者

WPF Datagrid - Set the mouse cursor after the completion of loading records

开发者 https://www.devze.com 2023-04-11 04:21 出处:网络
I have the following scenario: We\'re building a WPF MVVM application. Sending the command to load mylist. The DataSource is set to mygrid.ItemsSource = mylist. I need to set the mouse cursor to Curs

I have the following scenario:

We're building a WPF MVVM application. Sending the command to load mylist. The DataSource is set to mygrid.ItemsSource = mylist. I need to set the mouse cursor to Cursors.Wait while it loads and开发者_运维技巧 return to mylist Cursors.Arrow after completion of loading. The list contains 1,000 records. But it happens that the loading of the list is completed and the datagrid has a delay on the design of the records on screen. The cursor responds to the loading of mylist.

Is there a way to set the mouse cursor after the completion of the design of records on screen and not the end of the completion of mylist? I have done tests with paging, EnableRowVirtualization disabling and even then, you can see that the cursor does not respond properly.

Best regards


It would be much easier to help you, if you post code from ViewModel that provides data loading and xaml-piece of DataGrid. For now it's hard to say anything.

p.s. mygrid.ItemsSource = mylist looks pretty strange for MVVM

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号