Skip to main content
Home Forums General Silverlight Getting Started Drag and Drop in a proper place
4 replies. Latest Post by antonio.castro.jr on October 2, 2008.
(0)
antonio.jr
Member
2 points
5 Posts
10-01-2008 8:40 PM |
Hy guys,
I´m just starting using Silverlight 2 and I´d like to know how can I drag and drop an image into an exact place within the canvas. Just like you do in an Album. If it´s not the right place, avoid the image of being dropped.
If it´s not too much, is it possible to use that turn page effect (used in a sample) to drop the images into the pages?
Thanks in advance
HarshBar...
Star
9908 points
1,719 Posts
10-02-2008 4:51 AM |
Hi,
you Can Handle Mousemove,MouseLeftButtondown and MouseLeftButtonUp event and you can drag and Drop a Control in your Page.
check this Sample for Details.
http://www.dotnetcurry.com/ShowArticle.aspx?ID=198
antonio....
10 points
6 Posts
10-02-2008 8:38 AM |
Hi Harsh,
Thanks for your interest. I´ve already seen this link. I know how to drag UIElements on the Canvas. What I´m trying to do is to only allow the dropping in a right place, lets say, in an special panel.
I also know that I´ll have to code something in the MouseLeftButtonUp event. I just don´t know how to acomplish it.
I´m trying to figure out.
Thanks
10-02-2008 8:52 AM |
As you are trying to drop at a special Panel so in that case You have to Remove this control from your Canvas collection and Add that to Another Panel's collection..
10-02-2008 10:35 AM |
Is there any example of that?