Categories+TabbedMDI=duplicate actions

StatusIDPriorityType
Closed24514MinorBug
ProfileReply
stristanClient

I have implemented Dock Panels support in TabbedMDI interface as suggested in your documentation. I have a one Category window with AllowAdd=True. The end result is that New (in root list view) + SaveAndNew (in detail view) actions now duplicated.
Images attached.

Replies

UserDescriptionPosted On
NikolayAgent

Hello stristan,

Thank you for the bug report. We need additional time to reproduce and confirm it.

Thank you for your patience.

Regards,
Nikolay.

NikolayAgent

Hello stristan,

Sorry for the delayed answer.
We have reproduced a bug and will fix it in the next Xafari build.

We registered the issue [102.149260] in our issue tracking system. You may reference to this number later to find out its state.

Regards,
Nikolay.

NikolayAgent

Hello stristan,

We found a solution which can resolve your issue without new Xafari build.
To make Dock Panels work correctly when UIType = TabbedMDI you need to add the following templates forms to your WinApplication project.

  •  To support old style templates:

public class TabbedMDIDetailViewForm : DetailViewForm, IDockManagerHolder
{
private readonly DockManager _dockManager;

public TabbedMDIDetailViewForm()
{
_dockManager = new DockManager { Form = this };
}
public DockManager DockManager { get { return _dockManager; } }
}

  • To support Standard style forms:

public class TabbedMDIDetailFormV2 : DetailFormV2, IDockManagerHolder
{
private readonly DockManager _dockManager;

public TabbedMDIDetailFormV2()
{
_dockManager = new DockManager { Form = this };
}
public DockManager DockManager { get { return _dockManager; } }
}

  • To support Ribbon style forms:

public class TabbedMDIDetailRibbonFormV2 : DetailRibbonFormV2, IDockManagerHolder
{
private readonly DockManager _dockManager;

public TabbedMDIDetailRibbonFormV2()
{
_dockManager = new DockManager { Form = this };
}
public DockManager DockManager { get { return _dockManager; } }
}

After that you need to create event handler for CreateCustomTemplate and set needed template.
Here is the code of event handler:

var modelOptions = this.Model.Options as IModelOptionsWin;
if (modelOptions != null && (modelOptions.UIType == UIType.TabbedMDI && e.Context == TemplateContext.View))
if (this.UseOldTemplates)
e.Template = e.Template = new TabbedMDIDetailViewForm();
else if (modelOptions.FormStyle == RibbonFormStyle.Ribbon)
e.Template = new TabbedMDIDetailRibbonFormV2();
else
e.Template = new TabbedMDIDetailFormV2();

Also you can find a sample solution in the attached archive.

Regards,
Nikolay.

Attached files:

× This ticket is closed.

Write US