I’m creating something like a wizard, and I’m using several User Control, but the roblem is I need to get the parent from that element to replace for the next user control.
How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Lets think you have 5 UserControls. While creating wizard you need to add new UserControl inside a grid and remove the previous UserControl from the same parent grid.
The following function will automatically remove the older UserControl and add the new UserControl.. But for the first UserControl you can directly add it to its parent using MyParentPanel.Children.Add(myFirstUserControl);
Hope this helps you!