Click here to Skip to main content
15,889,735 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created ribbon form (XtraMain)and I set IsMdiContainer Property to true,i also add documentManager controle i set MdiParent to XtraMain I have add this code to open child forms
C#
public void ViewChildForm(XtraForm _form)
        {
            if (!IsFormActived(_form))
            {
                _form.MdiParent = this;
                _form.Show();
            }

        }
      private bool IsFormActived(XtraForm form)
        {
            bool IsOpenend = false;
            if (MdiChildren.Count() > 0)
            {
                foreach (var item in MdiChildren)
                {
                    if (form.Name == item.Name)
                    {

                        tabbedView1.ActivateDocument(item);
                        IsOpenend = true;
                    }

                }
            }
            return IsOpenend;
        }

and i use this code in click of button to open the child form
C#
private void bbtnEmployee_ItemClick(object sender, ItemClickEventArgs e)
        {
            FrmEmployee frme = new FrmEmployee();
            frme.Name = "FrmEmployee";
            ViewChildForm(frme);
        }

my problem start when the form contain a LayoutControl for example i have this code that open on click of button
C#
private void btnBonLivraison_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            LayoutControl lc = new LayoutControl();
            lc.Dock = DockStyle.Top;
            LookUpEdit OrderNumber = new LookUpEdit();
            OrderNumber.Properties.TextEditStyle = TextEditStyles.DisableTextEditor;
            OrderNumber.Properties.DataSource = shippProdu.GetOrderNumber();
            OrderNumber.Properties.DisplayMember = "N° Bon de livraison";
            OrderNumber.Properties.ValueMember = "N° Bon de livraison";
            lc.AddItem(Resources.selectOrderNumber, OrderNumber).TextVisible = true;
            lc.Height = 70;
            this.Controls.Add(lc);
            this.Dock = DockStyle.Top;
            lc.BestFit();

the second I click on a button the tabHeader disappears,what cause this problem?and how can I solve it.before I use documentManager I used XtraTabControl and if i click a button to open LayoutControl and after that try to open another form the focus remaining in the first form even when the form two is already opened and if I want to go to form two I must first click on a tab of the first form and then click on tab of the second form , thanks in advance .
this is my main form
https://i.stack.imgur.com/Ab9CN.jpg[^]
and this is when the TabHeader disappears
https://i.stack.imgur.com/tP92N.jpg[^]

What I have tried:

I try to use a separate UserControl with DocumentManager but did not work form me.
Posted
Updated 4-Jan-19 1:17am

1 solution

I'd suggest to post this question on DevExpress Support Center[^].
They know their products behaviour better than anyone of us.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900