Control on Title Bar
Hi I've used the sform control to put some control in a panel and put the panel on the title bar.
I've changed the backcolor of the panel and the titlebar but there is always a line on the left of the panel, The color of this line is the same of the form background color. The Location of the panel is 0,0
There is a workaround?
The code is this:
Imports System.ComponentModel
Imports System.IO
Imports Syncfusion.WinForms.Controls
Partial Friend Class FrmAebersoldPDFViewer
Inherits SfForm
Private lblTitolo As New Label
Public WithEvents btnAltriFile As New Button
Public WithEvents CmbVolumi As New ComboBox()
Public WithEvents btnPaginaSuccessiva As New Button
Public WithEvents btnPaginaPrecedente As New Button
Private searchPanel As Panel = New Panel()
Public Sub New()
InitializeComponent()
Me.BeginUpdate()
Me.Style.TitleBar.Height = 45
With searchPanel
.Size = New Size(1900, 45)
.BackColor = Color.Aquamarine
.Location = New Point(0, 10)
End With
With CmbVolumi
.Size = New Size(250, 50)
.Location = New Point(10, 10)
.DropDownStyle = ComboBoxStyle.DropDownList
End With
With btnAltriFile
.Text = "Altro..."
.Location = New Point(270, 10)
.Size = New Size(70, 22)
End With
With lblTitolo
.AutoSize = True
.TextAlign = ContentAlignment.MiddleCenter
.Location = New Point(850, 10)
.Font = New Font(lblTitolo.Font.Name, 12, FontStyle.Italic)
End With
With LblNumPagine
.Location = New Point(My.Computer.Screen.WorkingArea.Width - 400, 0)
.Font = New Font(lblTitolo.Font.Name, 16, FontStyle.Italic)
.TextAlign = ContentAlignment.MiddleRight
.AutoSize = False
.Size = New Size(200, 45)
End With
With btnPaginaPrecedente
.Size = New Size(30, 30)
.ImageAlign = ContentAlignment.MiddleCenter
.Image = My.Resources.PAGINA_INDIETRO
.Location = New Point(LblNumPagine.Location.X + 210, 10)
.UseVisualStyleBackColor = True
.Enabled = False
End With
With btnPaginaSuccessiva
.Size = New Size(30, 30)
.ImageAlign = ContentAlignment.MiddleCenter
.Image = My.Resources.PAGINA_AVANTI
.Location = New Point(LblNumPagine.Location.X + 240, 10)
.UseVisualStyleBackColor = True
.Enabled = False
End With
searchPanel.Controls.Add(CmbVolumi)
searchPanel.Controls.Add(btnAltriFile)
searchPanel.Controls.Add(lblTitolo)
searchPanel.Controls.Add(LblNumPagine)
searchPanel.Controls.Add(btnPaginaSuccessiva)
searchPanel.Controls.Add(btnPaginaPrecedente)
Me.TitleBarTextControl = searchPanel
Me.EndUpdate()
End Sub
Private Sub FrmAebersoldPDFViewer_Load(sender As Object, e As EventArgs) Handles MyBase.Load
AddHandler CmbVolumi.SelectedIndexChanged, AddressOf CmbVolumi_SelectedIndexChanged
AddHandler btnAltriFile.MouseDown, AddressOf btnAltriFile_MouseDown
AddHandler btnPaginaSuccessiva.Click, AddressOf btnPaginaSuccessiva_Click
AddHandler btnPaginaPrecedente.Click, AddressOf btnPaginaPrecedente_Click
With Me
.SetStyle(ControlStyles.UserPaint Or ControlStyles.AllPaintingInWmPaint Or ControlStyles.OptimizedDoubleBuffer, True)
.UpdateStyles()
.Show()
.Refresh()
End With
Thanks in advance
Attachment: Immagine_20250916_175015_37e5be22.jpg
Hi Andrea De Luca,
We have checked and confirmed the reported issue "Unwanted visual line appears in title bar when using custom controls in TitleBarTextControl" as a defect. We have logged a bug, and it will be fixed in our NuGet release scheduled for October 07, 2025.
You can track the status of this report through the following feedback link,
Feedback Link: Unwanted visual line appears in title bar when using custom controls in TitleBarTextControl in WinForms | Feedback Portal
Note: The provided feedback link is private, and you need to log in to view this feedback.
We will let you know once it is released. We appreciate your patience until then.
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.
Regards,
Rabina M
Nice implementation! For that thin line, try docking the panel (Dock = DockStyle.Fill) or set its location to (0,0) with the form’s padding removed, it often fixes the mismatch.
Feels like managing a property portfolio, one small edge detail can throw off the whole look.
Hi,
I've tried, but it worsen the situation.
It makes flickering the title bar.
I'm sending you the source so you can test on my code.
Thank You so much for Your attention.
Attachment: AebersoldPDFViewer_(2)_775ed252.zip
Andrea De Luca,
We have investigated the scenario. As we already mentioned, the fix for the issue "Unwanted visual line appears in title bar when using custom controls in TitleBarTextControl" will be fixed in our NuGet release scheduled for October 07, 2025.
Therefore, the workaround will no longer be necessary. Once the fix is available, it will resolve the reported issue.
We appreciate your patience and understanding until then.
Wonderful...Thanks for your work!
Andrea De Luca,
We have investigated the reported issue and identified its root cause. However, we were unable to include the fix as promised today due to ensuring proper UI appearance of the TitleBarTextControl within the SfForm when the form is in a maximized state.
We will resolve this issue and include the fix in the 2025 Volume 3 Service Pack 1 release which is scheduled on third week of October 2025.
We will notify you once it is released. We appreciate your patience and understanding during this time. Thank you for your continued cooperation.
Andrea De Luca,
Sorry for the inconvenience caused. We are unable to include the fix for this issue in our 2025 Volume 3 Service Pack 1, which was released today as promised. We have fixed this issue and need some time to ensure the stability and appearance of the SfForm with this fix. We will resolve this issue and include the fix in the NuGet release scheduled for October 22, 2025.
We will notify you once it is released. We appreciate your patience and understanding during this time.
Thank you for your continued cooperation.
Andrea De Luca,
We apologize for the inconvenience caused. We have fixed the issue, but we are unable to include the fix in this week's NuGet release. We can provide the Custom NuGet or Patch as an alternative. Kindly confirm the Syncfusion version you are currently using so we can proceed accordingly.
No problem, It's only a small problem.
The version on Syncfusion is 30.1.37
Andrea De Luca,
We sincerely regret the inconvenience caused. As part of our recently updated Service Level Agreement (SLA) policy, we no longer provide patches for previous versions of our product. Therefore, we regret to inform you that we cannot deliver the custom patch for version 30.1.37 and the fix will be included in our upcoming weekly NuGet release scheduled on Oct 28th 2025, without any further delay.
We appreciate your patience and understanding in the meantime.
Andrea De Luca,
We would like to let you know that Essential Studio Weekly NuGet packages v31.2.4 has been published in nuget.org with the fix for the issue "Unwanted visual line appears in title bar when using custom controls in TitleBarTextControl". Please let us know if you have any concerns in this.
Root cause details:
When the form is maximized, the location of the TitleBarTextControl and the clipping rectangle used to display it are misaligned, which causes a visible line in the title bar.
Note: The TitleBarTextControl location was revised in the maximized form to align with the updated client area, which was modified to ensure proper display of the MDI child.
- 11 Replies
- 3 Participants
-
AD Andrea De Luca
- Sep 16, 2025 04:17 PM UTC
- Oct 28, 2025 01:58 PM UTC