我的WPF应用程序是在高分辨率下有点慢,当涉及到组合框。我是pretty的确定及其对组合框的BitmapEffects,在ItemsPanel特别是阴影的效应。
My WPF Application is kinda slow in high resolutions when it comes to ComboBoxes. I am pretty sure its the BitmapEffects on the ComboBoxes, especially the DropShadow-Effect on the ItemsPanel.
我如何可以将其禁用或彻底删除所有位图效果的组合框和它的孩子?
How can I disable it or completely remove all Bitmap Effects on the ComboBoxes and its children?
推荐答案您可以尝试更改的的组合框的控件模板。但是我建议先来分析,前松了大量的时间来优化你的东西只怀疑是缓慢的。
You can try to change the ControlTemplate of the ComboBox. However I would propose to profile first, before loose a lot of time for optimizing things you only suspect to be slow.
微软分析工具是非常强大的个人资料WPF的图形用户界面。
The microsoft profiling tools are very powerfull to profile WPF-GUIs.
我还没有研究,但我不认为MS使用 BitmapEffects 在 CONTROLTEMPLATES 。不过,我已经看到的情况下使用 DropShadowEffect (这不是 BitmapEffect )影响业绩非常不利:在其内的更新已标记在整个屏幕为无效的内容。随着性能分析工具中的穿孔,你会发现并解决这些问题非常快。
I have not looked into but I don't think that MS uses BitmapEffects in its ControlTemplates. However I already have seen a case where using the DropShadowEffect (this is not a BitmapEffect) has influenced performance very negatively: Updates within it have marked the content of the whole screen as invalid. With Perforator of the performance profiling tools, you will find and fix such problems very fast.
更多推荐
WPF:禁用阴影效果/ BitmapEffects的组合框
发布评论