如何在我的控件中启用VirtualizingStackPanel(Multicolumn Combobox)? [英] How Can I Enable VirtualizingStackPanel In My Control (Multicolumn Combobox) ?
问题描述
大家好,
我在wpf中为选择的表格项创建自定义用户控件(Multicolumn combobox)。
但是,显示很多项目的速度很慢。我尝试使用组合框样式的VirtualizingStackPanel来提高性能,但虚拟化不起作用!
我的代码在这里:
MultiColumnComboBox.zip
请有人可以帮助我检查我的代码
提示:您可以在此路径中找到默认的多列组合框样式:
MySourceCode>主题> Generic.xaml
Hi everybody,
I create custom user control (Multicolumn combobox) in wpf for select tabular items.
but, that is very slow to show many items. i try to improve performance with using VirtualizingStackPanel in combobox style, but virtualizing not work!
My code is here:
MultiColumnComboBox.zip
Please anyone can, help me by review my code
Tip: you can find default multicolumn combobox style in this path:
MySourceCode > Themes > Generic.xaml
推荐答案
我自己找到了解决方案:)
解决方案是:显式设置GridViewRowPresenter高度在组合框样式。
I found solution myself :)
The solution is : explicit set GridViewRowPresenter height in combobox style.
这篇关于如何在我的控件中启用VirtualizingStackPanel(Multicolumn Combobox)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!