1

I am developing a whiteboard application in WPF.

How can I draw a rectangle and circle/ellipse by dragging the mouse like we do in Paint by dragging the mouse pointer ?

I am using WPF canvas for drawing.

Xyroid
  • 463
  • 5
  • 19

2 Answers2

2

have a look into below link

http://www.codeproject.com/Articles/22776/WPF-DrawTools

JSJ
  • 5,653
  • 3
  • 25
  • 32
  • 1
    I can't run that project. I am getting ~400 errors in "DrawToolsLib" class library – Xyroid Jun 13 '12 at 12:13
  • getting error symbol in this assemblies "WindowsBase, PresentationCore, PresentationFramework" – Xyroid Jun 13 '12 at 12:22
  • add these refrances from dot.net refrances. which version of visual studio you are using. – JSJ Jun 13 '12 at 12:29
  • tried that it didnt worked ref : http://stackoverflow.com/questions/10820241/error-project-file-must-include-the-net-framework-assembly-windowsbase-prese – Xyroid Jun 13 '12 at 12:37
  • which version visual studio and which framework you are using.? – JSJ Jun 13 '12 at 12:39
1

To run WPF-DrawTools you have to:

  1. Let the VS to convert the project.
  2. Set appropriate NetFramework version (say, Net 4.5).
  3. Add references to correspondent libraries (e.g., PresentationCore) if VS could not find them itself.
j0k
  • 22,600
  • 28
  • 79
  • 90
Mikle
  • 11
  • 1