Click here to Skip to main content
13,403,621 members (51,843 online)
Rate this:
Please Sign up or sign in to vote.
Hi, I want to make a Paint like App(pencil, text, eraser, lines & shapes drawings) with ability to resize shapes & edit Text at any time (Like Microsoft PowerPoint) in WPF.

My Question is : What Tools should I use? (for some reasons I don't want to use Inkcanvas)

And how to make my own custom drawing brush (for example using an Image for that) or just a soft edge brush?

Sorry I am asking a lot, but I was able to do all that in winForm Applications.

<Thanks To="All" Regards="Best"></Thanks>
Posted 20-Jan-13 18:56pm
Updated 20-Jan-13 18:57pm
You request something which would need a really big time-consuming post. At the same time, you limit some of your explanation by "for some reasons"...
Abed AlSayed 21-Jan-13 0:08am
I don't want to use inkcanvas because it doesn't support adding images(that what I know), I was thinking to add images like this <inkcanvas ...><image .../> but another problem that is the Order of the images(the drawing will be on the top and images on the bottom)
I see... but anyway, you should not use XAML at all for graphics. More exactly, you can only used it as a file format, if you want. And for UI design, outside your drawing. There is no "design-time" for graphic editor.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

This is quite doable, but, in my view, unfortunately, even the initial directions and ideas would take too much work.

So, roughly speaking, for pixel graphics, you can use DrawingVisual and, for vector — Canvas. You can combine different approaches and do many different things. Please see:[^],[^];[^],[^].

WPF documentation is pretty good; you can find all you need by yourself, just spend some time. Your time :-).

Abed AlSayed 21-Jan-13 0:20am
ok thats Fine, but how about pencil and eraser drawing??
Well, you will need to handle events (with DrawingVisual — on the very low level), add some pixels, remove pixels... Not too easy, anyway...
Abed AlSayed 21-Jan-13 17:23pm
Ok, please my where I can start?
Sergey Alexandrovich Kryukov 21-Jan-13 17:59pm
You can start where you find it convenient, may be from accepting this answer formally (green button) :-)
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This is actually harder in WPF, because the logical way to do it, is not to draw on a bitmap, but to keep track of actions and draw them on TOP of your image. At least, that's how I did it when I did it and it was a royal pain
Abed AlSayed 21-Jan-13 0:01am
If you did it, did you post an article or anything about it?
Christian Graus 21-Jan-13 0:02am
No, I did it for my job, so I don't own the code to give away.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.1802120.2 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100