locked
How to draw text on Canvas RRS feed

  • Question

  • Currently, I am able to add various Shape on Canvas by

    canvas.Children.Add(line);
    canvas.Children.Add(polyLine);
    //...

    But, how can we draw text, with various font size, font type, ... on it?

    Wednesday, October 31, 2012 5:15 AM

Answers

  • The Canvas is a general purpose Panel. You can add any UIElement to it, not just Shapes.

    To draw text add a TextBlock.

    --Rob

    • Proposed as answer by Tanu Singhal Wednesday, October 31, 2012 7:11 PM
    • Marked as answer by Yan Cheng Cheok Wednesday, November 7, 2012 9:28 AM
    Wednesday, October 31, 2012 5:26 AM
    Moderator