我写了这个代码在WPF:如何在WPF中创建Abstract类的System控件的实例?
System.Windows.Controls.Panel Panel1 = null;
Panel1 = new System.Windows.Controls.Panel();
但它说:
Error1 Cannot create an instance of the abstract class or interface 'System.Windows.Controls.Panel'
如何解决这个问题?谁能回答我的问题吗?
错误信息是正确的!您只是无法创建任何抽象类或接口的实例。你究竟在做什么? –
@MitchWheat我想创建一个面板/ –
什么类型的面板? –