1
votes

My wpf application was running very slow. I was using the performance profiling tools for wpf from windows and noticed my hardware IRTs per frame where very high (100+). I read in the help that this is caused by some effects. After disabling some effects i found that this was the cause...

        <Border.Effect>
            <DropShadowEffect Direction="45" Color="#DDDDDD"/>
        </Border.Effect>

I was using this effect on all my drag and drop objects.

Now I'm looking for a similar effect that doesn't freeze the entire application. Is there any effect in .net 4.0 what I can use to achieve this?

Thank you very much

David

2
What are the hardware specs of the video card/driver? You might want to make sure that the dropshadow is rendered using the GPU instead of the CPU. - Emond
My video card is a ati 4650M with the 2012.0309.43.976 driver. But if it was software rendered wouldn't it be software IRTs(those are almost all the time 0)? - DavidVdd

2 Answers

2
votes

Using bitmap caching in on the usercontrol also fixed the problem. Unless scaling is very important you could use this...

<UserControl x:Class="myControl"
   CacheMode="BitmapCache"
 >
 <Grid>
 </Grid>
</UserControl>