title: Bind collection of lines to canvas in WPF
body: <p>I have an observable collection of line segments specified by its boundary points. How can I bind it to draw the lines on a canvas?</p>
  
  <p>I have seen the <a href="https://stackoverflow.com/a/1030191/2336304">solution</a> for shapes using only one point to define the position. But for applying this approach to lines it need awkward precomputations on coordinates to get the position of outer rectangle and make line coordinates relative to it. Is there a way to avoid it?</p>