public override void TouchTap(TouchPoint t) { if (HandleButtons(t)) return; Point a = t.ToPoint(); Canvas.Source = currentColor; Canvas.FillCircle(a, 2); foreach (var b in nodes) { var v = a - b.pos; const double DISTANCE_LIMIT = 200; if (v.Length < DISTANCE_LIMIT) { Canvas.Source = new Color(currentColor.Red, currentColor.Green, currentColor.Blue, (1 - (v.Length / DISTANCE_LIMIT)) * .5); Canvas.DrawLine(a, b.pos); } } nodes.Add(new Node(a)); }