Let's say I have
type MyUserControl = XAML<"MyUserControl.xaml",true>UserControl has one constructor that takes no parameters. The new type, MyUserControl, will only have one visible constructor as far as Intellisense is concerned, but if you go through the type's ConstructorInfo, you will find another constructor that takes a single FrameworkElement as a parameter. Creating the element with this second constructor will cause the control to fail to render properly. I happened to find this issue because I was creating the control using Unity's resolve. It used the second constructor by default and the control failed to render.
Let's say I have
type MyUserControl = XAML<"MyUserControl.xaml",true>
UserControl
has one constructor that takes no parameters. The new type,MyUserControl
, will only have one visible constructor as far as Intellisense is concerned, but if you go through the type'sConstructorInfo
, you will find another constructor that takes a singleFrameworkElement
as a parameter. Creating the element with this second constructor will cause the control to fail to render properly. I happened to find this issue because I was creating the control using Unity's resolve. It used the second constructor by default and the control failed to render.