Core_System.xaml.cs:
public Core_System(ProSimSDK.ProSimConnect connection)//构造函数带参数导致MainWindow.xaml报错
{
...
}
MainWindow.xaml:
<Border Name="Core_System">
<IOS:Core_System/>//不能用作对象元素,...未定义公共无参数构造函数或类型转换器
</Border>
MainWindow.xaml.cs构造函数中InitializeComponent()报错:
Object reference not set to an instance of an object.
https://stackoverflow.com/questions/4755617/how-to-i-connect-a-viewmodel-to-a-view-when-the-view-model-has-parameters-in-the?rq=1
上有类似的问题,可我没能找到例子或解决方法,如何解决这个问题?谢谢。