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

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -