title: How to draw custom circle in Windows 10 Universal App on a separate thread?
body: <p>I've created a new universal app project (VS 2015), and would like to randomly draw a circle on the page via a separate thread.  Please see the below simple code - what needs to be added to actually draw the circle ?</p>
  
  <p>thanks!</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.IO;
  using System.Linq;
  using System.Runtime.InteropServices.WindowsRuntime;
  using Windows.Foundation;
  using Windows.Foundation.Collections;
  using Windows.UI;
  using Windows.UI.Xaml;
  using Windows.UI.Xaml.Controls;
  using Windows.UI.Xaml.Controls.Primitives;
  using Windows.UI.Xaml.Data;
  using Windows.UI.Xaml.Input;
  using Windows.UI.Xaml.Media;
  using Windows.UI.Xaml.Navigation;
  using Windows.UI.ViewManagement;
  using Windows.UI.Xaml.Shapes;
  using System.Threading.Tasks;
  
  namespace CircleDraw    {
      public sealed partial class MainPage : Page
      {
          public MainPage()
          {
              this.InitializeComponent();
              this.Loaded += MainPage_Loaded;
          }
          private void MainPage_Loaded(object sender, RoutedEventArgs e)
          {
              Task.Factory.StartNew(() =&gt; DrawNewCircleEverySecondAsync(), TaskCreationOptions.LongRunning);
          }
          private static Random r = new Random(DateTime.UtcNow.Millisecond);
          private const int minRadius = 25;
          private const int maxRadius = 100;
          private async Task DrawNewCircleEverySecondAsync()
          {
              double height = grid1.ActualHeight;
              double width = grid1.ActualWidth;
              while (true)
              {
                  int x = r.Next((int)width);
                  int y = r.Next((int)height);
                  int radius = r.Next(minRadius, maxRadius);
  
                  // How do I draw this new circle here?
  
                  await Task.Delay(1000);
              }
          }
      }
  }
  </code></pre>