I have a WPF application that follows the MVVM pattern. The View contains DataGrid (from WPF Toolkit) that displays some information and supports paging. I want the rows开发者_如何转开发 number to depend on the DataGrid's size. How can I do that?
RenderSize is size. http://msdn.microsoft.com/enus/library/system.windows.uielement.rendersize.aspx
From datagrid size and row size you should be able to calculate how many row can fit on a single screen.
精彩评论