how to use dependency property to replace the parameter in the constructor of a UserControl?
- 阅读更多 关于 how to use dependency property to replace the parameter in the constructor of a UserControl?
问题 I noticed that similar questions have been asked before but I did not find any detailed examples. I have a winform program, its constructor has a parameter cn: public AddFailure(ProSimConnect cn)// constructor in winform { this.connection = cn; InitializeComponent(); ... } Now I need to simulate it in a UserControl in WPF and put it into MainWindow. In MainWindow.xaml: <Border ...> <IOS:Core_System/> </Border> I want to do this but I know I can't because it shouldn't have any parameter: