I have Set Form, inside this form I inject some another set form
public partial class ServicePriceBlockSetForm : RibbonForm
{
[Inject]
private OtherServiceSetForm OtherServiceSetForm { get; set; }
public ServicePriceBlockSetForm()
{
InitializeComponent();
}
...
}
When I call this form by button click, first time form opened and everything is OK. When I close and try open this form again I get:
An unhandled exception of type 'System.ObjectDisposedException' occurred in
System.Windows.Forms.dll
Additional information: Cannot access a disposed object.
Form registred in Ninject container like this.
_kernel.Bind<ServicePriceBlockSetForm>().ToSelf();
_kernel.Bind<OtherServiceSetForm>().ToSelf();
What can I do with this error?