I use the Windows Performance package (which part of the Microsoft Windows SDK) to profile my sample application. I use the “Puncher” with the option “Show chip updates on dirty areas”, which allows me to see when and where areas are redrawn in the application.
When I hover over the TextBox control, I see that it is redrawn several times, and the processor load increases. I tested a very simple window with just a TextBox control and a control button.
Is it normal for WPF to redraw mouse control? Is there anything I can do to keep this to a minimum?
Here are the windows that I use
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<StackPanel Orientation="Horizontal">
<TextBox Height="25" Width="150" >
</TextBox>
<Button Margin="10,0,0,0" Height="25">1211</Button>
</StackPanel>
</Grid>