title: how to use Drawingvisual in wpf?
body: <p>i have a screen that shows thousands of points and refresh rate is 10 ms.
  first i had problem because rendering was slow and jittery.
  i searched internet people suggest me to convert shapes to visual because shapes have a lot of events and is heavy to render. i changed the points to visuals like this:</p>
  
  <pre><code>public class MyVisualHost : FrameworkElement{
  // Create a collection of child visual objects. 
  private VisualCollection _children;
  
  public MyVisualHost()
  {
      _children = new VisualCollection(this);
      ...
  }
  
  // Provide a required override for the VisualChildrenCount property. 
  
  protected override int VisualChildrenCount
  {
      get { return _children.Count; }
  }
  
  // Provide a required override for the GetVisualChild method. 
  
  protected override Visual GetVisualChild(int index)
  {
      if (index &lt; 0 || index &gt;= _children.Count)
      {
          throw new ArgumentOutOfRangeException();
      }
  
      return _children[index];
  }}
  </code></pre>
  
  <p>the performance still is not acceptable. the question is what is the difference between shapes and FrameworkElement. both have lots of events that make them heavy to render. i want something that doesnt have events. what can i do?!</p>
  
  <p>actually i want to add these visuals to canvas and give them their positions using canvas.setLeft and canvas.setTop. how to do this without inheriting from FrameworkElement?</p>