none
1 Control Used Multiple Times

    Question

  •  Hey,

     Im sure its fine to do, but i have a control that is basically an image object wrapper with some additional things added to it. I add a few of them to the main page on start, then when clicking on them another control loads that displays the same control with alot more information, however i didnt want to load it all again so i thought it would be best to just give it the existing control to add to its own layout root... however i keep getting an error when assigning the child property... and the control isnt null...

     

    Value does not fall within the expected range.

     

    Is the error i keep getting... anyway only thing i can think of is that SL somehow gets confused internally if the same control is a child in 2 seperate controls... I thought this may be a case and tried to see if there was a way to clone the control (although i would rather not do as i already have all the data and object loaded so duplicating it for a few moments is a bit of a waste in my eyes) but i couldnt find anything...

     Like always, any advice would be great!

    Thursday, May 28, 2009 5:14 PM

Answers

  • Basically you cannot do that. You have two options:
    1. Remove the control from the parent before giving it a new parent.
    2. Create a new instance of your control.
    Thursday, May 28, 2009 11:15 PM

All replies