Current filter:
                                You should refresh the page.
                                  • It would be nice to have a control that allows basic drawing functionality on the PictureEdit. Basically, a color picker, lines with optional arrow ends, drawing with mouse cursor, basic shapes like square and circle and maybe a highlighter.

                                    I have an immediate need for such a control, but I also think others would find a lot of value in this.


                                2 Solutions

                                Creation Date Importance Sort by


                                I started working on a simple solution to your question because I thought it might make a good topic for my blog. Although I don't have a write-up done yet, I've attached a sample project illustrating the direction that I'm taking to accommodate simple drawing onto the PictureEdit control.

                                I've created a PictureEdit descendant control (named PictureEditCanvas) that can be dragged onto Forms like a standard control. I've added to additional items to the right-click context menu of the control: Drawing Tools and Save Image. The first will open a dialog window allowing to select from 3 tools: line, rectangle and ellipse. You can also set the shape fore color and border width. The PictureEditCanvas control is then changed into what I call "drawing mode" wherein you can click within the control to begin drawing the shape by dragging the mouse (use the escape key to cancel drawing).

                                The Save Image button will allow to save this modified image to your disk. Hopefully this provides you with a good starting point for your project.

                                Show all comments
                                • Christopher Todd 10.28.2015

                                  Thanks Brendon! I'll certainly will look at it!

                                • Brendon Muck [DevExpress MVP] 10.28.2015

                                  I've attached an updated version that allows for fillable shapes, anti-aliasing and freehand drawing with the mouse.

                                • Brendon Muck [DevExpress MVP] 10.28.2015
                                • Christopher Todd 10.28.2015

                                  That is awesome!!
                                  I was working on a feedback control for one of my applications and was thinking it would be great if the user's could draw on a screenshot of the particular window they were on. This would be one extra way for them to convey their needs to me. I'll try your code first thing tomorrow! I appreciate you taking the time to develop the code!!

                                • Nadezhda (DevExpress Support) 10.29.2015

                                  Hello Brendon,

                                  Thank you for the project and the article. I agree with you that it may be useful to users.
                                  We always appreciate your feedback.

                                • Brendon Muck [DevExpress MVP] 10.30.2015

                                  Updated version allowing text to be placed onto the image

                                • Sami@DPS 09.07.2017

                                  Hi Brendon Muck ,

                                  your project sample related to Drawing onto the image and writing text onto the image is very useful. we also need implement this functionality in our project .
                                  I have question to ask please. Can we do similar thing for the pdf also using PDFViewer ?
                                  In PDF no need to drawing, just Writing Text on pdf like you doing onto the image. the behavior should be same.

                                  Let me know if we can do so .

                                  Thank you .

                                • Aleks (DevExpress Support) 09.07.2017

                                  Hello Samiullah,

                                  In order not to mix multiple questions within one thread, I have created a separate ticket on your behalf (T553268: Is it possible to draw text over a PDF document). It has been placed in our processing queue and will be answered shortly.

                                • Sami@DPS 09.08.2017

                                  Thank you Aleks,

                                  this is good you have separate ticket ,I was going to create it but you already did. thank you again .

                                • Aleks (DevExpress Support) 09.08.2017

                                  You are always welcome, Samiullah.

                                Hello Christopher,

                                We don't plan to implement such functionality in the near future.
                                However, you can do this manually. For example, you can use the approach in the Get the correct mouse coordinates (X and Y) in PictureEdit image with a zoom ticket to draw using a mouse cursor.
                                Still thank you for sharing your ideas with us. We always appreciate customer feedback.