views:

20

answers:

1

Hi,

I have a C# application developed with Visual Studio 2008 that is like a paint, where you can write using the mouse. I use the Graphics and Bitmap classes.

Now, I need to do the same application but in Visual Studio 2010 and using the Silverligth Tools. Do you know what is the best way to do it? I was searching but not enough to find a solution yet.

Thanks in advance.

Regards.

A: 

You'll most likely want to use subclasses of Shape placed upon a Canvas to draw in Silverlight.

For details, see Shapes and Drawing.

Reed Copsey
Thanks for your help. I was looking that, but I prefer to programm out of the designer, I mean, without using the xml, I want to do it programming in csharp in .cs file.
Enrique Crespo Martín
You can do the same thing in C#. Just add the items to the canvas in code instead of xaml - remember, anything you can do in xaml, you can also do in C#.
Reed Copsey
Thanks, I knew that you can do the same in the designer than programming but, maybe it´s a stupid question, but I can`t find the information in msdn.microsoft.com, all the info there is doing it with the xml designer and I think I haven´t the posibility to change it and see in chsarp code. When I want to put a button or similar items it is easy with the designer, but what I want is for example when you click on a button the application has to draw a point where the mouse clicked, and that I think is impossible to do with the xml desginer. Thanks a lot for your help.
Enrique Crespo Martín