Hi experts
I'm doing the design of the application and want to transfer MenuStrip (I use the menu as there are sub-items but I don't know how to make an arrow if there are items) and SfConboBox on the TitleBar, I create a FlowLoyoutPanel and add controls to it.
FlowLayoutPanel menuPanel = new FlowLayoutPanel();
menuPanel.Controls.Add(msMainMenu);
menuPanel.Controls.Add(cbLaboratory);
cbLaboratory.Height = 20;
cbLaboratory.Anchor = AnchorStyles.Right;
int size = msMainMenu.Width + cbLaboratory.Width + 40;
menuPanel.Size = new Size(size, 25);
//Put menu in title bar
this. TitleBarTextControl = menuPanel;
But there are several problems that I do not know how to solve:
1. How to make the panel be created the size of the TitleBar and there is no indentation (painted over the background so that it is visible how the panel is created).
2. How to make the buttons stand out as standard onka buttons (close, expand, hide) so that the selection is the size of the TitleBar.
If there are more correct controls or a method of how to do as I want, I will be glad to have your help.
I attach a photo of my design that I developed and how I was able to do it.
Hi Azmus
|
How to make the panel be created the size of the TitleBar and there is no indentation (painted over the background so that it is visible how the panel is created). |
You can load the panel to the size of the titlebar by setting the size to the `SfForm.TitleBarTextControl.Size`. And to provide indentation or padding to the `TitleBarTextControl`, you need to set the padding to `SfForm.Style.TitleBar.Padding`. Please find the code snippet below.
Please let us know if you have any concerns. |
|
|
How to make the buttons stand out as standard onka buttons (close, expand, hide) so that the selection is the size of the TitleBar. |
We suspect that you are looking to add the button in the title bar. You can make the button to the size of the title as shown in the code snippet above. We suggest you to use the SfButton Control to achieve the requirement and also you can add image to the SfButton. Please refer the below UG for more details.
UG : https://help.syncfusion.com/windowsforms/button/appearance#image
If we misunderstand your requirement, please provide us more details with the video illustration. It will be more helpful for us to provide you the prompt and timely solution. |
Regards,
Sampath Narayanan.S
Hi, I found a bug, if you specify Maximized in the form builder for WindowState then the panel with the menu and buttons disappears and if you specify Normal all works, I need exactly Maximized.
Hi Azmus,
We would like to let you know that Essential Studio Weekly NuGet
packages (v20.1.0.48) has been published in nuget.org with the fix for the issue
“TitleBarTextControl disappears when SfForm's WindowState is set as Maximized
on initial loading”. Please let us know if you have any concerns in this.
Regards,
Dhanasekar M.