Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to drag and drop content of one label to another label in Silverlight 5 Form

Posted on 2013-06-15
2
462 Views
Last Modified: 2013-07-07
I have a Form in a Silverlight 5 application with two lables (Label1 and Label2) on it.
The content of Label1 is “This is Label1” and the content of Label2 is “This is label2”.

I need help with code (C# or VB NET) that will allow me to accomplish the following:

When I drag Label1 and drop it over Label2, the content of Lable2 changes to “This is Lable1”.
So in this task, as I drag Lable1, I carry the content (or the data associated with lable1) of label1 and drop it over label2.

Thank you for your help in anticipation.
0
Comment
Question by:FaheemAhmadGul
2 Comments
 
LVL 13

Accepted Solution

by:
Molnar István earned 400 total points
ID: 39263533
http://msdn.microsoft.com/en-us/library/cc189066%28v=vs.95%29.aspx

my idea is :
1. when on mousedown: get value from the label (in a global value)
2. when on mousemove: get current position (in global valuea)
3. when on mouseup: check the position / if position is the same as the second label position change text from first to lets say ""  and the second will get the global value

hope it helps
0
 

Author Closing Comment

by:FaheemAhmadGul
ID: 39305023
Many thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question