Hi all, Our application is visually composed in (effectively) a 2-column design. Our designer wants to place drop-shadows around each column, but when we do we notice the dirty-region for repaint grows to encompass the entire border when any of its sub-elements need repainting. Below is an example demonstrating the problem. Hook it up to Perforator, turn on Show Dirty Rectangles and move the mouse over the button. You'll notice the entire border is repainted when it only needs to paint the button. Why, and how do i stop this? OR is there another way to apply a drop-shadow effect without the repaint penalty? (in our real system, we're seeing 10-20% CPU usage just because of this).
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="WPFDropShadow.MainWindow" x:Name="Window" Title="MainWindow" Width="640" Height="480"> <Grid x:Name="LayoutRoot"> <Border BorderBrush="#FFCA2C2C" BorderThickness="2" Margin="147,67,165,85" CornerRadius="40"> <Border.Effect> <DropShadowEffect Direction="-42" BlurRadius="6" Opacity="0.635"/> </Border.Effect> <Button Content="Button" Margin="126,114,109,113"/> </Border> </Grid> </Window> Thanks, Xerx
_______________________________________________ ozwpf mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
