tags:

views:

82

answers:

1

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?

+2  A: 

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.

The microsoft profiling tools are very powerfull to profile WPF-GUIs.

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.

HCL
The performance tools did not help at all. Neither Perforator nor Visual Profiler could help to find the bottleneck.
Falcon
From what I can tell it's the ItemPresenter's PopupAnimation that makes the application appear slow, the app seems to run a bit better without the animation. The peaks when opening the combobox in Visual Profiler are categorized as "Unlabeled Time", so you can't tell whats the problem.
Falcon
I had similar problem in an environment of a client that had machines with disabled hw-rendering. See this post: http://stackoverflow.com/questions/2939128/how-to-know-if-a-graphics-card-provides-hardware-rendering-for-wpf. I don't know what all you have checked, however as I already wrote, take a look at the invalidation-rectangles. I had in another app performance issues with the DropShadowEffect and this was due to an bug in this effect leading to a huge invalidation-rectangle.
HCL
You're right, that's what happened to me! Now the output of Perforator makes sense to me! There was a DropShadow on our MainWindow. Now that it is removed, performance is fine for the comboboxes. Thank you, sir!
Falcon