title: Adding an ArcSegment on a WPF Canvas
body: <p>I'm trying to add to a WPF canvas a rounded corner rectangle. I read in several post ways to work with rectangles, but they are usually to add UI elements, using LineGeometry for example, not objects on WPF canvas.</p>
  
  <p>Can someone help me with how to handle the ArcSegment class to have it added to a canvas in the same way I add a line?</p>
  
  <p>For example when working with a line:</p>
  
  <p>First I define the line parameters</p>
  
  <pre><code>Line botLine = new Line();
  botLine.X1 = x + width - radius;
  botLine.Y1 = y;
  botLine.X2 = x + radius;
  botLine.Y2 = y;
  </code></pre>
  
  <p>Then I can add the line to canvas like this:</p>
  
  <pre><code>canvas1.Children.Add(botLine);
  </code></pre>
  
  <p>But I cannot add an ArcSegment using the same method. What would be the approach in this case? Also there is a way to join the line and the arc together in a single entity?</p>