title: Drawing Polylines in WPF
body: <p>The code below is an example from Microsoft to generate a polyline. I have already implemented this, but it does not work.</p>
  
  <p>My question is: what is the method to make the "myPolyline" object to show? The last line in code is <code>myGrid.Children.Add(myPolyline)</code>, I do not understand which object is supposed to be the named "myGrid", maybe the answer to my question is related to this.</p>
  
  <pre><code>' Add a Polyline Element
  Dim myPolyline As New Polyline()
  myPolyline.Stroke = Brushes.SlateGray
  myPolyline.StrokeThickness = 2
  myPolyline.FillRule = FillRule.EvenOdd
  Dim Point4 As New System.Windows.Point(1, 50)
  Dim Point5 As New System.Windows.Point(10, 80)
  Dim Point6 As New System.Windows.Point(20, 40)
  Dim myPointCollection2 As New PointCollection()
  myPointCollection2.Add(Point4)
  myPointCollection2.Add(Point5)
  myPointCollection2.Add(Point6)
  myPolyline.Points = myPointCollection2
  myGrid.Children.Add(myPolyline)
  </code></pre>