title: WPF canvas render
body: <p>I have this canvas and some objects (images, paths) that I want to move every millisecond with 1px to left. After I did this, I noticed a lot of lag. How can I improve the rendering performance?</p>
  
  <pre><code>    &lt;Grid&gt;    
          &lt;Canvas Grid.Row="0"&gt;
              &lt;Image x:Name="Cover" Source="happy_footer.png" Stretch="Uniform" Canvas.Bottom="0" Canvas.Left="0" Width="2500"/&gt;
              &lt;Image x:Name="rocketMan" Source="rocketman.gif" Stretch="Uniform" HorizontalAlignment="Left" Height="100" Margin="50,300,0,0" VerticalAlignment="Top" Width="100"/&gt;
              &lt;Path x:Name="rocketManPath" Stroke="Green" Fill="#4CFF0000" Data="M 5,400 L 15,305 L 80,295 L 50,400 Z" Canvas.Left="40" /&gt;
              &lt;Path x:Name="Building1" Stroke="Green" Fill="#4CFF0000" Data="M 365,518 L 365,425 L 655,425 L 655,518 Z" /&gt;
              &lt;Path x:Name="Building2" Stroke="Green" Fill="#4CFF0000" Data="M 735,528 L 735,248 L 778,218 L 925,218 L 925,528 Z" /&gt;
          &lt;/Canvas&gt;
      &lt;/Grid&gt;
  </code></pre>
  
  <p><strong>Edit:</strong> My image is generated, so every few milliseconds I'll add another shape at the end. I'll never stop.</p>