public void InitializePlayButton() { // Already initialized if (PlayButton.Children.Count > 0) { return; } double canvasHeight = this.CellHeight / 5; double canvasWidth = this.CellWidth; double ellipseDiameter = canvasHeight * .7; double ellipseRadius = ellipseDiameter / 2; this.PlayButton.Height = canvasHeight; Ellipse ellipse = new Ellipse { Width = ellipseDiameter, Height = ellipseDiameter, Fill = new SolidColorBrush { Color = selectedColor, Opacity = 0.5 } }; Canvas.SetLeft(ellipse, canvasWidth / 2 - ellipseDiameter / 2); Point center = new Point(ellipseRadius, ellipseRadius); PointCollection trianglePoints = BitmapUtilities.GetTriangleVerticesInscribedInCircle(center, (float)ellipseDiameter * .7f / 2); // Construct the triangle Polygon triangle = new Polygon { Points = trianglePoints, Fill = new SolidColorBrush { Color = Colors.Blue, Opacity = 0.5 }, }; Canvas.SetLeft(triangle, canvasWidth / 2 - ellipseDiameter / 2); this.PlayButton.Children.Add(ellipse); this.PlayButton.Children.Add(triangle); }