0

First off I have a datagrid on the main form which is populated with about 7000 rows. It is bound (to ItemsSource) in the forms constructor. Everything runs extremely fast and smooth when the app loads (less than 1 sec). However when I want to load that same datagrid in another window it takes > 1 min. There is no difference in the xaml between pages. What could be causing this. I am using Virtualizing Stack panel as well as turning on Cell and Row Virtualization on the DataGrid. I have profile my Sql Server and the query runs in the same time for both calls so it's not a database issue.

I got curious and set up a listview and bound it to the same source on the second form and the same scenario happens as well.

What could be the issue?

4

1 回答 1

0

谢谢安德鲁。我想通了,但我认为这是一个错误。在我的主窗体中,数据网格位于第 2 行第 2 列。在我的调用窗体中,它位于第 0 行第 0 列。当我创建另一行并将数据网格移到其中时,它就像在主窗体中一样加载。数据网格显然不喜欢在第 0 行。它现在可以工作,所以我不会使用反射器来查看它。

于 2009-12-23T15:40:44.557 回答