BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
Hi all.
I have some buttons and labels on a form, so I'm planning to add some theme options to the form.
but it seems that when the theme is selected, the font size in the buttons and labels doesn't maintain the size I set earlier, and it looks like it's the theme's default size.
any suggestions for that?
Thank You.
Hi RIDWAN,
The provided details are not enough to proceed further. Could you please share the below things,
In Which controls you are facing the reported issue?
Video illustration of the reported issue
It will be helpful
for us to check on it and provide you with a solution at the earliest.
Regards,
Dhanasekar M.
sfButton1 and sfButton2 themes are not applied
sfButton1 and sfButton2 after themes is applied
sfButton1 and sfButton2 text before applying the theme I set them with the font setting "Segoe UI Semibold; 20pt".
but, after I press "Set style Office2016Black" the text font size of sfButton1 and sfButton2 changes not as I set initially.
I want, when the style is applied, both buttons stay with the text size and font type I set.
sorry if my explanation is wrong
Sorry in advance if it's a hassle.. to achieve what I want it seems to just set this code on each control:
sfButton1.Font = new Font(" Segoe UI Semibold", 18F);
but is there any other way to make it look simple? instead i add that code to all the controls in some form i have ?
Hi RIDWAN,
We are currently checking your reported issue with the provided information.
So, we need two more business days to validate this.
We will update with further details on October 27, 2022.
We appreciate your patience until then.
Regards,
Sethuramkumar S
I am happy to wait for further news sir..
Thank you for your response.
Hi Ridwan,
We have confirmed
the reported scenario is a defect and logged a report for the reported scenario
“Font Size is changed while changing the theme at runtime in SfButton”. We will
provide the fix in the NuGet version on 22nd November 2022.
You can track the status of this defect using the following feedback link:
If you have any more specification replication procedures or a scenario to be tested, you can add it as a comment in the portal.
Please let us know if you need any further assistance.
Regards,
Gokul T
Sorry for the inconvenience,
We are still working on this issue with high priority. We will update you on the fix in our upcoming NuGet release which is scheduled on 29th November 2022.
We appreciate your patience until then.
We have included the
fix in our latest Weekly NuGet release v20.3.0.59 which is available for
download (https://www.nuget.org/). We thank you for your support and
appreciate your patience in waiting for this update. Please get in touch with
us if you would require any further assistance.
I've tried it, and the results are amazing..
We are glad to know that your issue has been fixed. Please let us know if you need any other assistance. We are happy to assist you.
I am facing this same issue. I have shared some screen shots. When I click on the button it executes the following code and I get the small font controls. Please take necessary step as soon as possible thank you.
SkinManager.SetVisualStyle(this, "HighContrastBlack");
UpdateStyles();
Hi ashraful,
We are unable to reproduce the reported issue "Theme selection overrides initial font sizes in SfButton" from our end. Please refer to the attached sample and video for your reference.
If we misunderstood your query, Could you please share the following details? It will help us to provide better solution asap.
Regards,
Sekar Sivalingam
Dear Sekar Sivalingam,
Please see the attached project. You will understand the problem.
Hi Ashraful,
We have confirmed the reported scenario is a defect and logged a report for the reported scenario “Font size is changed while changing theme at runtime in WinForms TextBoxExt”. We will provide the fix in our weekly NuGet release, which is scheduled on before 15th October 2024.
You can track the status of this defect using the following feedback link: Font size is changed while changing theme at runtime in WinForms TextBoxExt in WinForms | Feedback Portal (syncfusion.com)
If you have any more specification replication procedures or a scenario to be tested, you can add it as a comment in the portal.
Please let us know if you need any further assistance.
Note: The provided feedback link is private, and you need to log in to view this feedback.
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,
Karthick Arjunan
Hi Ashraful,
Upon further analysis, we found that the `ThemeStyle.Font` property of the control is used to render text in the new themes (HighContrast, Office2019). We recommend setting the `ThemeStyle.Font` property to retain the same font when switching to the HighContrastBlack theme.
https://help.syncfusion.com/windowsforms/skins/getting-started#styles
Code Snippets:
private void Button1_Click(object sender, System.EventArgs e)
{
this.textBoxExt1.ThemeStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
SkinManager.SetVisualStyle(this, "HighContrastBlack");
this.UpdateStyles();
}