TitleBarTextControl hidden by MenuBar

Hello Syncfusion,
Firstly, Big thank for your support and all work that you giving to community.
I want customize the TitleBarTextControl by to set it to my customized control. However, the form's MenuBar hides the TitleBarTextControl. I use the last version 18.1.0.52.
You find the image that shows the pbroblem and the following is my source code:


     public partial class FormPrincipale : SfForm
     {
          public FormPrincipale()
        {
            InitializeComponent();

            #region Style Fenetre
            this.Style.TitleBar.BackColor = MyTitleBarColor;
            this.Style.TitleBar.IconVerticalAlignment = System.Windows.Forms.VisualStyles.VerticalAlignment.Center;
            this.Style.TitleBar.Height = 40;
            
            TitrePanel = new FlowLayoutPanel();
            TitrePanel.Size = new Size(190, 34);
            TitrePanel.Padding = new Padding(2);
            TitrePanel.Dock = DockStyle.Fill;
            LNomApplication = new Label();
            LVersionApplication = new Label();
            LTypeApplication = new Label();
            LServeur = new Label();
            LDossier = new Label();
            LUtilisateur = new Label();

            LNomApplication.AutoSize = LVersionApplication.AutoSize = 
                LTypeApplication.AutoSize = LServeur.AutoSize = LDossier.AutoSize = 
                LUtilisateur.AutoSize = true;
            LNomApplication.Dock = LVersionApplication.Dock =
                LTypeApplication.Dock = LServeur.Dock = LDossier.Dock =
                LUtilisateur.Dock = DockStyle.Left;


            TitrePanel.Controls.Add(LNomApplication);
            TitrePanel.Controls.Add(LVersionApplication);
            TitrePanel.Controls.Add(LTypeApplication);
            TitrePanel.Controls.Add(LServeur);
            TitrePanel.Controls.Add(LDossier);
            TitrePanel.Controls.Add(LUtilisateur);

            //Loads the TitrePanel to the title bar.
            this.TitleBarTextControl = TitrePanel;

            #endregion


Best regards



 


Attachment: TitleBarTextControl_956b5974.zip

6 Replies 1 reply marked as answer

SS Susmitha Sundar Syncfusion Team June 24, 2020 03:31 PM UTC

Hi Cosyspro, 
 
Thank you for using Syncfusion controls. 
 
We have validated the reported issue. While TitlebarTextControl is used, we have taken the entire form as client area and the title bar will be drawn in the client area. So that we can add the control in the Titlebar.   
Here you want to dock the control, But the behavior of the docking is to fill the entire client area thus the control covers the Titlebar.  
 
So, can you please check your application without Dock style and menubar?  
  
Regards,  
Susmitha S  
 



CO Cosyspro June 24, 2020 11:40 PM UTC

Hi Susmitha,
Thank you for response.
I have the same problem.
I use DockingManager and TabbedMDIManager controls in the main form. I don't know if these controls hide title bar or no?
Also, I need of MenuBar in my application. how to replace it ? Any suggestion please ?
Best regards


VS Vijayarasan Sivanandham Syncfusion Team June 25, 2020 05:08 PM UTC

Hi Cosyspro,

Thanks for the update.
 
The behavior of the docking is to fill the entire client area thus the control covers the Titlebar. Meanwhile, you want to load the MenuStrip in Titlebar which is also impossible since the behavior of MenuStrip is to dock in top of the client area which will disappear the Form buttons.  In docking applied in control menustrip not supported. So, can you please share your exact requirement, we will provide the solution based on that.  

Regards,
Vijayarasan S



CO Cosyspro June 25, 2020 09:41 PM UTC

Hi Vijayarasan,
Thank you for response.
In attached file, you find image that shows  My Desired TitleBarText and the content of the main form.
Regards 
Cosyspro

Attachment: RequiredTitleBarText_f0fb7f09.zip


VS Vijayarasan Sivanandham Syncfusion Team June 26, 2020 04:19 PM UTC

Hi Cosyspro,

Thanks for the update.

We are preparing workaround based on provided information to achieve your requirement “TitleBarTextControl hidden by MenuBar”, but we are facing some technical issue in achieve your requirement.
So, we need two more business days to validate this. We will update you with further details on or before June 30, 2020.

We appreciate your patience until then. 
 
Regards, 
Vijayarasan S 



VS Vijayarasan Sivanandham Syncfusion Team July 1, 2020 02:30 AM UTC

Hi Cosyspro,

Thank you for your patience.

Your requirement can be achieved by setting the Padding for Form. Please refer the below code snippet,
 
           this.Padding = new Padding(0,30,0,0); 
            this.IsMdiContainer = true; 
             
            this.tabbedMDIManager.AttachToMdiContainer(this); 
            this.tabbedMDIManager.TabStyle = typeof(Syncfusion.Windows.Forms.Tools.TabRendererOffice2016Colorful); 
             
            Form form = new Form(); 
            form.MdiParent = this; 
            form.Text = "Tab1"; 
            form.Show(); 
 
            Form form1 = new Form(); 
            form1.Text = "Tab2"; 
            form1.MdiParent = this; 
            form1.Show(); 

Sample Link: https://www.syncfusion.com/downloads/support/forum/155434/ze/TitleBarSample-1400644719

Screenshot for your reference:



Regards,
Vijayarasan S

 


Marked as answer
Loader.
Up arrow icon