title: How to draw on screen for Windows Metro Style Apps in C#?
body: <p>I simply want the user to be able to draw on the screen with some sort of pointer. </p>
  
  <p>I already have the code working that captures the pointer's position, but I can't figure out how to place the pixels or shapes or whatever onto the screen. </p>
  
  <p>I found this useful tutorial: <br>
  <a href="http://www.dotnetspeaks.com/DisplayArticle.aspx?ID=137" rel="nofollow">http://www.dotnetspeaks.com/DisplayArticle.aspx?ID=137</a> </p>
  
  <p>And I've been looking at the documentation here: <br>
  <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465055(v=VS.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/apps/hh465055(v=VS.85).aspx</a></p>
  
  <p>No luck so far. =( The tutorial is for Windows Phone 7, so it's a little bit different. =\ Help, please? =) </p>
  
  <p>And this is what I have so far.</p>
  
  <p>The drawing part:</p>
  
  <pre><code>    private void Image_PointerPressed(object sender, PointerEventArgs e)
      {
          Debug.WriteLine("Image_PointerPressed");
          isTracing = true;
      }
  
      private void Image_PointerReleased(object sender, PointerEventArgs e)
      {
          Debug.WriteLine("Image_PointerReleased");
          isTracing = false;
      }
  
      private void Image_PointerMoved(object sender, PointerEventArgs e)
      {
          Debug.WriteLine("Image_PointerMoved");
          Debug.WriteLine(e.GetCurrentPoint(this).Position);
          if (isTracing)
          {
              Debug.WriteLine("isTracing");
  
              Point pos = e.GetCurrentPoint(this).Position;
              Color color = Colors.Green;
              Line line = new Line() { X1 = pos.X, X2 = pos.X + 1, Y1 = pos.Y, Y2 = pos.Y + 1 };
              line.Stroke = new SolidColorBrush(color);
              line.StrokeThickness = 15;
              //// So how do I draw this line onto the screen?? ////
  
          }
  
      }
  </code></pre>
  
  <p>For reference, stuff elsewhere in the code: </p>
  
  <pre>
  
      using System;
      using System.Collections.Generic;
      using System.Diagnostics;
      using System.IO;
      using System.Linq;
      using System.Threading.Tasks;
      using Multimedia.FFmpeg;
      using Windows.Foundation;
      using Windows.Storage;
      using Windows.Storage.Pickers;
      using Windows.Storage.Streams;
      using Windows.UI.Xaml;
      using Windows.UI.Xaml.Controls;
      using Windows.UI.Xaml.Shapes;
      using Windows.UI.Xaml.Media;
      using Windows.UI.Xaml.Input;
      using Windows.UI.Input;
  
      bool isTracing = false;
  
  </pre>