StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
-
- Posts: 1
- Joined: Tue Jan 31, 2017 12:36 pm
StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
Hello friends, I am using the most updated version of Stimulsoft for WPF.
Previously we had the 2017 version, these days we have updated to version 02.2020 and in our WPF projects, when opening Viwer, the elements of all windows are changed, it is as if StiWpfViwer changed the styles of the system in general, how should I proceed in this situation? can someone help?
Previously we had the 2017 version, these days we have updated to version 02.2020 and in our WPF projects, when opening Viwer, the elements of all windows are changed, it is as if StiWpfViwer changed the styles of the system in general, how should I proceed in this situation? can someone help?
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
Hello,
Could you explain your issue in more detail, screenshots?
Thank you.
Could you explain your issue in more detail, screenshots?
Thank you.
Re: StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
We have the same issue after upgrading to 2020.2.1
See the attachments.
See the attachments.
- Attachments
-
- before.png (18.75 KiB) Viewed 5109 times
-
- after.png (21.08 KiB) Viewed 5109 times
-
- before.png (18.75 KiB) Viewed 5110 times
Re: StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
It would be nice to get some feedback on this. Apparently more users are having this issue.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
Hello,
Please clarify which product are you use. On the screenshots is not our product elements.
Thank you.
Please clarify which product are you use. On the screenshots is not our product elements.
Thank you.
Re: StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
Clearly I was reacting on the original post:
I think it's because of this new setting: StiOptions.Wpf.LoadThemeMode
I used both options without success.
The screenshots are showing the impact on our styling before we load a stireport report control and after we loaded the control. This is only the case with 2020.2.1. We currently use 2019.4 and have been using older versions before this without this behavior.Previously we had the 2017 version, these days we have updated to version 02.2020 and in our WPF projects, when opening Viwer, the elements of all windows are changed, it is as if StiWpfViwer changed the styles of the system in general, how should I proceed in this situation? can someone help?
I think it's because of this new setting: StiOptions.Wpf.LoadThemeMode
I used both options without success.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
Hello,
Please send us a sample project which reproduces the issue for analysis.
Thank you.
Please send us a sample project which reproduces the issue for analysis.
Thank you.
Re: StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
Attached project reproduces the issue. Open with VS2019
See the MainWindowViewModel.cs for this piece of code:
In my opinion the default option 'StiLoadThemeMode.OnceForTheWholeApp' shouldn't change the height of the tab control header.
See the MainWindowViewModel.cs for this piece of code:
Code: Select all
// This option breaks the styling of the Telerik tab control
//StiOptions.Wpf.LoadThemeMode = StiLoadThemeMode.OnceForTheWholeApp;
// This option seems to work
StiOptions.Wpf.LoadThemeMode = StiLoadThemeMode.ForEveryOpenedWindow;
- Attachments
-
- StimulsoftWpfStyleIssue.zip
- (2.31 MiB) Downloaded 324 times
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
Hello,
That behavior is correct. If uses
StiLoadThemeMode.OnceForTheWholeApp
then the theme is loaded once globally for the entire application, so all the controls will change depending on the theme. It's the right behavior, there's nothing to be done. That's how WPF works.
You can use the second option:
StiLoadThemeMode.ForEveryOpenedWindow
Thank you.
That behavior is correct. If uses
StiLoadThemeMode.OnceForTheWholeApp
then the theme is loaded once globally for the entire application, so all the controls will change depending on the theme. It's the right behavior, there's nothing to be done. That's how WPF works.
You can use the second option:
StiLoadThemeMode.ForEveryOpenedWindow
Thank you.
Re: StiWpfViewer changing element styles (label, TextBox, GroupBox, Menus)
No that is not how WPF works. A 3rd party control should never change the styling of controls that aren't part of their own library.
Imagine you would reference a control I made and I changed the padding globally for all controls. How would you like that?
So yes you can load your styling once but no you shouldn't change the style of any control you don't own.
Imagine you would reference a control I made and I changed the padding globally for all controls. How would you like that?
So yes you can load your styling once but no you shouldn't change the style of any control you don't own.