c# - WPF Create instances of controls defined in xaml -


I have a definite definition in xaml which is determined with a large number of properties which can be re- It is difficult to produce. Can I define control in xaml and somehow I can create an example in the code behind it?

Another option is to create control as a resource with X: share = "false "Property If you want to get new examples at each resolution:

   & Lt; /UserControl.Resources>   

In the code:

  var myNewCtrl = this.FindResource ("MyControl") as a rectangle; // Usage Control    

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? -