0
當我從一個窗口中分離出有界的(由ItemsSource屬性)datagrid並將其附加到另一個窗口時,datagrid中的項目不會呈現。從一個窗口到另一個窗口分離/附加WPF數據網格導致項目不被渲染
window1.Content = null; //before this, my datagrid is displayed without problems
window2.Content = myDataGrid; //now I only see the column headers
我已經打過電話UpdateLayout請在窗口和兩個數據網格,我已經試過測量/安排。我不確定問題是什麼。任何想法,爲什麼這是?提前致謝。