|
-
Feb 7th, 2009, 07:16 AM
#1
Thread Starter
Member
drag canvas/usercontrol...?
Hi,
I use the website below for drag and drop canvas:
http://blogs.msdn.com/marcelolr/arch...02/542641.aspx
I have a textbox, button and user control in my application. The user control consists of a label. When the user type text on the textbox and click on the button, the user control containing the text in the textbox will appear.
I use the website above for drag and drop the user control but it does not work. But it works if it is not a user control. So does it means drag and drop a user control is different from canvas...? And is there any solution for it...? I'm using WPF application
Below is a small portion of my coding:
Dim test As New UserControl3
Private Sub DragStarted2()
m_IsDragging2 = True
m_OriginalLeft2 = Canvas.GetLeft(test.textLabel)
m_OriginalTop2 = Canvas.GetTop(test.textLabel)
m_OriginalRight2 = Canvas.GetLeft(test.textLabel)
m_OriginalBottom2 = Canvas.GetTop(test.textLabel)
m_OverlayElement2 = New Rectangle()
m_OverlayElement2.Width = m_OriginalElement2.RenderSize.Width
m_OverlayElement2.Height = m_OriginalElement2.RenderSize.Height
newCanvas.Children.Add(m_OverlayElement2)
End Sub
Thanks
-
Feb 9th, 2009, 06:48 AM
#2
Re: drag canvas/usercontrol...?
-
Feb 9th, 2009, 11:55 AM
#3
Thread Starter
Member
Re: drag canvas/usercontrol...?
It is not the same question. This thread is about dragging and dropping of canvas/user control. That thread is about not able to click on the tab control
-
Feb 9th, 2009, 03:26 PM
#4
Hyperactive Member
Re: drag canvas/usercontrol...?
If it's only a label, why are you using a custom control?
-
Feb 10th, 2009, 04:39 AM
#5
Thread Starter
Member
Re: drag canvas/usercontrol...?
Its my project requirement
-
Feb 10th, 2009, 04:50 AM
#6
Hyperactive Member
Re: drag canvas/usercontrol...?
OK. Why is it a requirement?
What is the problem exactly? Do you get an error message? Have you placed breakpoints at crucial places to see if your events are firing as expected?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|