Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
C# how build a document\graphic editor that uses XML files.

I need to build an editor like the rich text box that I can move image frames around and text around on a grid. It needs predefined objects (text box, image box) that an end user could select to place on a grid and be able to re-size them and move them with an auto snap to grid function. The document needs to be definable in inches. The file type on saving the document needs to be XML.

I am not expecting anyone to create the code for me. Just point me in a starting direction. I know how to create rich text boxes and also saving and reading XML files. I don't know how to get an object window with a grid plus snapping and being able to place objects on it that can be moved and re-sized. Once I am done I will make the source freely available to whoever wants it. Maybe there is some code out there very close to this or an app that can do this already. I have failed to find anything close enough. If anyone needs more details or screen shots let me know.

Thanks for your help,
Donald
Posted
Updated 2-Oct-15 6:15am
v3
Comments
OriginalGriff 2-Oct-15 11:21am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalization if you want to be taken seriously.
DonaldTar 2-Oct-15 12:14pm    
Is that better?
Richard MacCutchan 2-Oct-15 11:36am    
Adding objects and moving them on a grid requires a knowldege of graphics programming. Lots of articles and samples can be found by Google or a search through the articles section of CodeProject.
DonaldTar 2-Oct-15 12:14pm    
Thanks
I was figuring that but I was hoping there was another way.
Richard MacCutchan 2-Oct-15 12:26pm    
You need to study Windows programming. Text is easy because you just deal with characters and they tend to flow in straight lines. However once you move to object/images you are dealing with pixels and colours, and anything derived from them. And they tend to move in all directions and orientations. Once you learn the basics it is not that difficult, just a bit more time consuming.

1 solution

I found an SVG editor on this website.
I think it will work with some modifications.
It creates vector objects on a background with a Grid
and saves to SVG which I didn't know is in an XML format.
I can read the object names X and Y location values and X and Y dimensions from the SVG files.
Thanks for the tip about graphics programming.
Next stop I am getting a book on programming with graphics.
 
Share this answer
 
Comments
Patrice T 2-Oct-15 16:16pm    
Please don't use answer to discus with others.
You should rather Improve question to add details or updates. and delete this answer.

Your question already barely fit this forum.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900