StackPanel with huge amount of children

和自甴很熟 提交于 2019-12-25 02:46:12

问题


i'm building a wpf control based on the outlook calender sample in code project,

first of all i wanna know if this is a good sample or that this is not the way of writing controls?

second, i need to support milliseconds view of the calender, the meaning of that is more than 24 * 60 * 60 items

my question is how to build this panel(if it should still be a StackPanel) and how can i refill the panel when resolution (zoom) changes and avoid stucking the gui while i perform the fill.

to sum up : i need a fast way to insert many items to a StackPanel in wpf.


回答1:


Perhaps you can use the VirtualizingStackPanel class. Remember you need to databind the items of the panel to make it virtual.




回答2:


You probably need to do UI Virtualization to do this; although, I'm not sure what the usability ramifications of having 80k rows would be.



来源:https://stackoverflow.com/questions/1373010/stackpanel-with-huge-amount-of-children

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!