private void CanvasControl_Draw(CanvasControl sender, CanvasDrawEventArgs args) { CubeHelper helper = new CubeHelper(GetLength()); foreach (Tuple<Vector2, Vector2> edge in helper.GetEdges(currentTransformation)) { ColorValue colorValue = ColorComboBox.SelectedValue as ColorValue; Color color = (colorValue == null ? Colors.Black : colorValue.Color); args.DrawingSession.DrawLine(edge.Item1, edge.Item2, color); } }