c# - Passing parameters in Silverlight Usercontrol -


I have a usercontrol called MyUserControl.xaml which dynamically adds another user control:

UserControl myControl = (UserControl) assembly.CreateInstance ("EditControlPage"); MyControl.Name = "MyUserControl";

This is a shared editing control that will be shown to many other controls.

What do I want when I use EditControlPage I know the control I am using I tried to add my control to the name. Name is named above when the name var = this.Name on the edit page but it gives blank.

Why not just UserControl myControl = new EditControlPage (parameter); ?

Comments