|
-
Jan 26th, 2011, 03:52 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] BlockUIContainer from a control VB.NET 2010
Hi all.
I have an existing flow document and onto it i wish to copy the contents of Grid into it. When i try i get the following error:-
"Specified element is already the logical child of another element. Disconnect it first."
Here is the function i am using which fails.
vb.net Code:
Private Function GraphicsPage() As BlockUIContainer
Dim uiCont As New BlockUIContainer()
Dim g as new grid = grdDiamond
uiCont.Child = g
Return uiCont
End Function
How would i disconnect the element? will i still be able to view the initial controls contents after it is disconnected? I have tried (fruitlessly) iterating the contents of the grid with a for each loop but the same error is reached on runtime when uiCont.Child is reached
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-
Jan 29th, 2011, 10:58 PM
#2
Hyperactive Member
Re: BlockUIContainer from a control VB.NET 2010
An instance of a control cannot have multiple parents. You should make a UserControl that has the elements you wish to copy. Use bindings to hookup to backing data. Then you can create multiple instances of your control, and they will show the same information if they have the same DataContext.
My monkey wearing the fedora points and laughs at you.
-
Feb 5th, 2011, 09:14 AM
#3
Thread Starter
Fanatic Member
Re: BlockUIContainer from a control VB.NET 2010
thanks arrow raider, will get that implemented... another major revision lol
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-
Feb 8th, 2011, 10:06 PM
#4
Hyperactive Member
Re: BlockUIContainer from a control VB.NET 2010
Alright, let me know if you run need any specific guidance; I just gave a brief overview of the approach to take.
My monkey wearing the fedora points and laughs at you.
-
Feb 10th, 2011, 11:38 AM
#5
Thread Starter
Fanatic Member
Re: BlockUIContainer from a control VB.NET 2010
Got it working. trying to bind all controls but have a new issue regarding xaml with bound data. I will create a new thread for this.
If debugging is the process of removing bugs, then programming must be the process of putting them in.
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
|