Adding Dockpanels doubles Standard actions

StatusIDPriorityType
Closed27158MinorBug
ProfileReply
ReinholdClient

Hello,
I have created a new XAF 16.1.5 solution, set in TabbedMDI.Mode and then I have added XafariDockPanels Module.
Additionally I have added the substandig class and the event to load it.
Now all the standard actions are doubled. What am i doing wrong?

Thanks
Reinhold

public class TabbedMDIDetailViewForm : DetailViewForm, IDockManagerHolder
{
public DockManager DockManager
{
get
{
var dockManager = new DockManager();
dockManager.DockingOptions.ShowCaptionImage = true;
dockManager.Form = this;
dockManager.TopZIndexControls.AddRange(new string[] {
"DevExpress.XtraBars.BarDockControl",
"DevExpress.XtraBars.StandaloneBarDockControl",
"System.Windows.Forms.StatusBar",
"DevExpress.XtraBars.Ribbon.RibbonStatusBar",
"DevExpress.XtraBars.Ribbon.RibbonControl"
});
return dockManager;
}
}
}

Attached files:

Replies

UserDescriptionPosted On
Sasha (Xafari Support)Client

Hello Reinhold,

Please inform us what Xafari version are you using?

Thanks, Sasha.

Sasha (Xafari Support)Client

Hi,

To solve this issue for Ribbon form style you can realise event CreateCustomTemplateEventArgs in your Program.cs for Win application:

public class Program {
[STAThread] public static void Main(string[] arguments) {
...
...
winApplication.CreateCustomTemplate += new EventHandler(winApplication_CreateCustomTemplate);
}
...
static void winApplication_CreateCustomTemplate(object sender, CreateCustomTemplateEventArgs e)
{
if (e.Context.Name == TemplateContext.ApplicationWindow)
{
e.Template = new MainForm();
}
else if (e.Context.Name == TemplateContext.View)
{
e.Template = new TabbedMDIDetailViewForm();
}
}}

 

We hope you find this information helpful.
Let us know if you need further assistance.
Best regards,
Sasha.

× This ticket is closed.

Write US