Search Results

Search found 1 results on 1 pages for 'peterhu'.

Page 1/1 | 1 

  • How should i draw text and shapes in wpf and C#?

    - by peterhu
    I want to do basic WPF graphics, i.e. rectangles, lines, circles and text. When should I use Drawing and when should I use a DrawingVisual? I have some code that uses Drawing and I render those to a DrawingImage and display that in an image control. Is this the right way? I could not see how to add text to a drawing. I had trouble positioning it too. Should I be rendering to a Canvas? I have some code that uses DrawingVisual and writes to a DrawingContext. That is like WinForms. Is this the recommended way? Do you have any high level advice on which APIs to use for basic graphics and labels? Will they options work on Silver Light and Desktop?

    Read the article

1