My question seems to be simple and I hope it is.
I have a dynamic collection of TextBox in a UiElementCollection.
The TextBox are children of a StackPanel.
My goal is simple :
Create a new TextBox with the Text of for example UiElementCollection[1].
TextBox myTextBox = new TextBox(); // New TextBox
UiElementCollection myCollection = myStackPanel.Children; // New Collection
// If I call this :
myCollection[8] = myTextBox;
// Error when I call my method
// --> System.ArgumentException
// If I call this :
myTextBox = myCollection[8];
// Error in my code
// --> Cannot convert.. UiElement to Controls.TextBox
string myString = myTextBox.Text;
Any one can help me to handle this please ? Thanks.