WPF:禁用阴影效果/ BitmapEffects的组合框

编程入门 行业动态 更新时间:2024-10-22 15:24:27
本文介绍了WPF:禁用阴影效果/ BitmapEffects的组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的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的组合框

本文发布于:2023-11-12 03:51:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580434.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:组合   阴影   效果   WPF   BitmapEffects

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!