Well, you're right.
The Theme is not the problem.
The problem is that I have a MainForm which is MdiContainer.
That MainForm has ribbonControlAdv and some buttons.
When I click one of those buttons, the new Form (Form A) will open in MainForm as a new Tab.
That new Form (Form A) has other buttons (which are merged in ribbonControlAdv with ribbonPanelMergeContainer1) and OnCLick, will open other Forms (Form B).
I need those other Forms (Form B or C or others) opened in MainForm MdiContainer.
For that, I'm using like this (In this case is a CellDoubleClick Event on a SfDataGrid on Form A), but is the same from a button.
private void data_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)
{
EditForm edit = new EditForm(this, SelectedRow);
edit.MdiParent = ActiveForm as MainForm;
edit.Show();
}
The Form B opens in MdiContainer correctly (as expected) and I can work in Form B. Even closing Form B has same issues.
When I click the Close button tab in MdiContainer MainMenu on Form A, the error arrises in here:
FormA.Designer.cs - in Form A
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing); //Error: Object not set to an instance of an object
}
Now, I can't figure out what's causing this but maybe the Form B is still not Disposed correctly? Need to add some kind of event On Form Closing or Form Closed?