public MainPage()
 {
     this.InitializeComponent();
     points = new List<Crossline>();
     colors = new List<Color>();
     textBlocks = new List<TextBlock>();
     random = new Random();
     LineDictionary = new ObservableDict<uint, Polyline>();
     lines = new List<Polyline>();
     tempLines = new List<Polyline>();
     //TempPointerDictionary = new ObservableDict<uint, Polyline>();
     var cls = typeof(Colors).GetTypeInfo().DeclaredProperties.ToList();
     foreach (PropertyInfo propertyInfo in cls)
     {
         colors.Add((Color)propertyInfo.GetValue(null));
     }
     this.DataContext = this;
 }
        public MainPage()
        {
            this.InitializeComponent();
            this.NavigationCacheMode = NavigationCacheMode.Required;

            MainCanvas.Width = Window.Current.Bounds.Width;
            MainCanvas.Height = Window.Current.Bounds.Height;
            points = new List<Crossline>();
            colors = new List<Color>();
            textBlocks = new List<TextBlock>();
            random = new Random();
            PointerDictionary = new ObservableDict<uint, Polyline>();
            TempPointerDictionary = new ObservableDict<uint, Polyline>();
             var cls = typeof(Colors).GetTypeInfo().DeclaredProperties.ToList();
            foreach (PropertyInfo propertyInfo in cls)
            {
                colors.Add((Color)propertyInfo.GetValue(null));
            }
            this.DataContext = this;
        }