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:
  1. Private Function GraphicsPage() As BlockUIContainer
  2.         Dim uiCont As New BlockUIContainer()
  3.         Dim g as new grid = grdDiamond
  4.         uiCont.Child = g
  5.         Return uiCont
  6.     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