Question on Skinmanager usage in MVVM

Hi,

trying to use SkinManager in MVVM.

I have set "Office2010Blue" and in the Ribbon BackStage i have filled a combobox with the available VisualStyles.
Now when a value is selected in the Combo i am executing in my ViewModel:

SfSkinManager.SetVisualStyle(Application.Current.MainWindow,(VisualStyles) Enum.Parse(typeof(VisualStyles), value));

It doesn't however change the theme.

2 questions:

Is it correct to apply it on "Application.Current.MainWindow" ?

Some themes don't show a Ribbon Backstage. Is that correct?

thanks,

Helmut

29 Replies

HW Helmut Wahrmann February 28, 2020 08:28 PM UTC

There seems to be a general Problem with SfSkinManager.

If am doing it via SkinStorage my app looks like this:

XAML has:

syncfusion:SkinStorage.VisualStyle="Office2010Blue"
Office2010Icon="../Resources/Images/MPTagThat_mepo.png"



Doing the same with SfSkinManager, it looks weird. I cannot open the Ribbon Backstage and also the Controls in the title bar to close the Window is missing.

XAML:

        xmlns:sfSkinManager="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
        sfSkinManager:SfSkinManager.VisualStyle="Office2010Blue"





ON Olety Nikhilesh Olety Nagendra Syncfusion Team March 2, 2020 11:30 AM UTC

Hi Helmut,

Thank you for contacting Syncfusion support.

Based on your both updates we have understood that you are trying to bind a ComboBox located in BackStage in MVVM pattern and when a theme is selected it is not applied, so we tried reproducing using a simple sample and we can see that themes are applied properly when changing in ComboBox.

Please find the sample below.



s it correct to apply it on "Application.Current.MainWindow" ?

Yes, you can use the Application.Current.MainWindow to apply style for current window.

Some themes don't show a Ribbon Backstage. Is that correct?

All the SfSkinManager themes support BackStage, but in SkinStorage only newer themes support BackStage and older one support ApplicationMenu. Please find the list below.

Themes that support BackStage - Office2013, Office2010Black, Office2010Blue, Office2010Silver, Metro, Transparent, Windows8 .

Themes that support ApplicationMenu - Office2007Blue, Office2007Black, Office2007Silver, Office2003, Blend, ShinyRed, ShinyBlue, Default, VS2010, SyncOrange .


Also, with the two image provided for the Theme Office2010Blue, we suspect that you have missed to add the separate assemblies for theme from SfSkinManager. 


Please find exact implementation details for applying themes using SfSkinManager in below UG documentation.

Please let us know if you have any concern regarding this and if you have any further queries.

Regards,
Nikhilesh O



HW Helmut Wahrmann March 4, 2020 10:58 AM UTC

Hi Nikhilesh,

strange. your sample works fine here.
I am using it inside a Prism application. I was creating a framework from scratch, which is like my prism application and this worked fine as well.

When i am applying the same to my application i have the weird behaviour described above.

Regards,

Helmut


HW Helmut Wahrmann March 4, 2020 11:11 AM UTC

ok, i found it. If i do that in the viewmodel, which is attached to my mainwindow the problem is there: 

SfSkinManager.ApplyStylesOnApplication = true;
But without that, some labels, which i have in the Statusbar don't change color and are hard to read or not readable at all.


ON Olety Nikhilesh Olety Nagendra Syncfusion Team March 5, 2020 08:57 AM UTC

Hi Helmut, 
 
Thank you for the response. 
 
Based on your last update we understood that when using the property SfSkinManager.ApplyStyleOnApplication to true, you had the first mentioned issue.  
But when you set this property to false, the first mentioned issue is gone, but you have some other issues with reading labels in the StatusBar. Can you confirm whether this is your problem? 
 
So, based on our understanding we have modified the sample by adding a StatusBar with some Items and labels. But when changing the themes, we didn’t see any issue with the label text color. Please refer the images below. 
 
Blend Theme: We have used Blend since it requires to change the Text color 
 
 
 
Can you please refer the above sample and confirm us whether we are using proper customization to reproduce the issue? Also, if you face any issue on your side can you provide the images of those as it would be helpful to analyze properly. 
 
Regards, 
Nikhilesh O 



HW Helmut Wahrmann March 8, 2020 06:53 PM UTC

Hi Nikhilesh,

thanks for the answer.
Try with your RibbonWindow.StatusBar and you know what i mean.

i changed your sample to use the above:

    <syncfusion:RibbonWindow.StatusBar>
        <syncfusion:RibbonStatusBar>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="StatusBar Item"/>
                <Label Grid.Column="1" Content="Label"/>
                <Button Grid.Column="2" Content="Button"/>
                <Label Grid.Column="3"  Content="Label"/>
                <StatusBarItem Grid.Column="4"  Content="Content"/>
            </Grid>
        </syncfusion:RibbonStatusBar>
    </syncfusion:RibbonWindow.StatusBar>

And you get with Office2016Colorful:

and with Office2016DarkGray:



thanks,

Helmut


ON Olety Nikhilesh Olety Nagendra Syncfusion Team March 9, 2020 12:21 PM UTC

Hi Helmut, 
 
Thank you for the information. 
 
Based on provided code changes we can reproduce the issue on our side, and we have logged a bug report for this. We will fix this and provide a fix patch on or before March 23, 2020. 
 
In meanwhile you can track the status of this issue through the below feedback link. 
 
We appreciate your patience until then. 
 
Regards, 
Nikhilesh O 



HW Helmut Wahrmann March 9, 2020 05:11 PM UTC

Great. thanks.

Please note that i observe something similar with the Headings in SfDataGrid.
I am creating the columns from within a program.

I haven't been able to recreate the same thing on a sample program.

As an example, how the SfDataGrid Header look like with Office2016DarkGray:



And Office2016Colorful:



While Office365 seems to look ok:




ON Olety Nikhilesh Olety Nagendra Syncfusion Team March 11, 2020 11:12 AM UTC

Hi Helmut, 
 
We have created a new incident under your Direct trac account to follow up with the query regarding SfDataGrid. We suggest you to follow up with the incident for further updates. Please log in using the below link.  
 
 
Regards, 
Nikhilesh O 



ON Olety Nikhilesh Olety Nagendra Syncfusion Team March 23, 2020 02:37 PM UTC

Hi Helmut,

The issue with "RibbonWindow status bar items forecolor not applied properly " has been fixed and the patch for this fix can be downloaded from the following location.

Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:
http://syncfusion.com/Installs/support/patch/17.4.0.39/934903/F152028/SyncfusionPatch_17.4.0.39_934903_3232020094351425_F152028.exe

Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:
http://syncfusion.com/Installs/support/patch/17.4.0.39/934903/F152028/SyncfusionPatch_17.4.0.39_934903_3232020094351425_F152028.zip 
 
Nuget Link: 
http://syncfusion.com/Installs/support/patch/17.4.0.39/934903/F152028/SyncfusionNuget_17.4.0.39_934903_3232020094351425_F152028.zip

Assembly Version: 17.4.0.39
Installation Directions :
This patch should replace the Syncfusion SfSkinManager Themes files under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\17.4.0.39\4.6
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\9.3.0.61\precompiledassemblies\9.3.0.61\4.0

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.

Note :
You can change how you receive bug fixes by navigating to the following link and updating your preferences.

https://www.syncfusion.com/support/directtrac/patches 

Disclaimer :
Please note that we have created this patch for version 17.4.0.39 specifically to resolve the following issue reported in this incident.

If you have received other patches for the same version for other products, please apply all patches in the order received.
This fix will be included in our main release 2020 Vol 1 which will be available in the April 1st week 2020.

Regards,
Nikhilesh 



HW Helmut Wahrmann March 24, 2020 12:09 PM UTC

Hi Nikhilesh,

the header of the SFDatagrid looks good, but the same problem is accross a lt of elements.
e,g, the Status Bar as you see below:



It is in the Header of Docking Manager, Heade of Tab Navigation, Items in ComboBoxAdv, etc.

thanks,

Helmut


DV Duraimurugan Vedagiri Syncfusion Team March 25, 2020 10:51 AM UTC

Hi Helmut,

Thanks for your update.

 
We have analyzed the reported issue "Ribbon Window status bar items forecolor not applied properly" with given patch (v17.4.0.39) and we are unable to reproduce the issue. Please refer the below video and sample for your reference.

Video: https://www.syncfusion.com/downloads/support/forum/152028/ze/Ribbon-1053469585
 
Sample 
used for testinghttps://www.syncfusion.com/downloads/support/forum/152028/ze/Ribbon152028724406833 



Note: Without the given patch we can able to reproduce the reported issue
. 
  
 

  
We suspect it might be due to the improper installation of patch, due to the following things. So please ensure the below things:

* Ensure whether all your referred Syncfusion assemblies are of same version.
* Could you please ensure, whether the pervious assembly is present in GAC. If so, remove the same.
* Ensure whether all your referred assemblies have been referring from the Syncfusion Build installed location and not from GAC location.
Location: C:\Program Files (x86) \Syncfusion\Essential Studio\WF\version\assemblies\4.6 

If assembly referred from GAC location, please do the following thing using the below UG link:

https://help.syncfusion.com/common/essential-studio/utilities#assembly-manager  

Also ensure whether Specific version property has been set to false for all assemblies which are referred in an application.

If you are still reproducing the issue after ensuring the above mentioned things, please revert us back with clear issue reproducing scenarios along with the issue reproducible sample and also let us know whether you customizing any theme in your sample?. It would be very helpful for us to proceed on this further.

Regards,
Durai



HW Helmut Wahrmann March 25, 2020 02:54 PM UTC

Hi Durai,

i am using .39 via nuget. 
compiled everything and then replaced the Themes dll with the one from the patch and starte the exe from the debug folder.

anyway, i am already at version 55 in my project, so i will await the official 2020 release and give it a try from there.

thanks,

Helmut


DV Duraimurugan Vedagiri Syncfusion Team March 26, 2020 01:26 PM UTC

Hi Helmut,

Thanks for your update.

We will include the reported issue "Ribbon Window status bar items forecolor not applied properly" in our upcoming main realse which will be roll out by April first week.

Regards,
Durai


DV Duraimurugan Vedagiri Syncfusion Team April 3, 2020 11:07 AM UTC

Hi Helmut,

We are glad to announce that our Essential Studio Volume 1, 2020 release (v18-1-0-42) is rolled out and is available for download under the following link.

https://www.syncfusion.com/forums/152921/essential-studio-2020-volume-1-release-v18-1-0-42-is-available-for-download  

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Durai


HW Helmut Wahrmann April 5, 2020 11:33 AM UTC

Hi Durai,

solved partly. The Status Bar looks ok now, but there are still problems in other parts.
Like Header of SFDataGrid or ComboBox Items.



I would have expected to have the Font color changed to white, like it is happening, when i am selecting a row.

regards.

Helmut



HW Helmut Wahrmann April 5, 2020 11:35 AM UTC

Never mind. just saw that in the Incident, which was opened, this will be fixed with the next patch release.


DV Duraimurugan Vedagiri Syncfusion Team April 6, 2020 02:15 PM UTC

Hi Helmut,

Thanks for your update.

We have analyzed the reported query “ComboBox item Forecolor issue” but we are unable to reproduce at our end and prepared the simple sample based on your requirement.

Here is the sample that works as expected:
https://www.syncfusion.com/downloads/support/forum/152028/ze/Ribbon-194010401  

Screen Shot:


If we misunderstood your actual requirement, could you please modify our sample into issue reproducible. It would be helpful for us to provide the solution at the earliest.

Regards,
Durai


HW Helmut Wahrmann April 6, 2020 04:29 PM UTC

Hi Durai,

easy to reproduce. 
I have modified the sample, so that you can select the themes from the ribbon combo.

Select the "ApplyStyleOnApplication" check box.
then select any theme from the combo. It will not do anything, since no other themes are in the reference.
Select "Office2016DarkGray" and then open the ombo again:



See what i mean?

regards,

Helmut


HW Helmut Wahrmann April 6, 2020 04:30 PM UTC

forgot attaching the sample

Attachment: Ribbon_59d1d2e2.zip


DV Duraimurugan Vedagiri Syncfusion Team April 7, 2020 01:31 PM UTC

Hi Helmut,

Thanks for your update.

We have checked the reported requirement and confirmed it as a defect. We have logged a defect report on this, and we will include this into our upcoming Vol1 Sp1 release which will be roll out by end of April.

You can track the status through the following feedback link:

https://www.syncfusion.com/feedback/13202/ribboncombobox-item-forecolor-is-not-applied-properly

Regards,
Durai


DV Duraimurugan Vedagiri Syncfusion Team May 14, 2020 06:08 AM UTC

Hi Helmut,

We are glad to announce that our Essential Studio 2020 Volume 1 service pack release v18.1.0.52 is rolled out and is available for download under the following link.

https://www.syncfusion.com/forums/154238/essential-studio-2020-volume-1-service-pack-release-v18-1-0-52-is-available-for-download

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Feedback : https://www.syncfusion.com/feedback/13202/ribboncombobox-item-forecolor-is-not-applied-properly
 
Regards,
Durai


HW Helmut Wahrmann May 19, 2020 09:15 PM UTC

Hi Durai,

yes, it is solved, but when initially opening the combo box, i can see still too dark colors.
and i have found other areas, where the style is not correctly applied.

i will document it in a separate thread.

thanks,

Helmut


DV Duraimurugan Vedagiri Syncfusion Team May 20, 2020 02:24 PM UTC

Hi Helmut,

We are very pleased to hear that the reported issue "RibbonComboBox item forecolor is not applied properly" is resolved at your end.

Please brief your requirement, at which point the style is not correctly applied? It would be helpful for us to provide the solution as soon as possible.

Regards,
Durai


HW Helmut Wahrmann May 23, 2020 08:50 AM UTC

Hi Durai,

it works pretty well on a RibbonComboBox, but for a native ComboBox i see this with the Office2016White theme.

Initially expanding the combo. As you see the text is black on dark blue.
Btw, i don't understand, why a theme that has "White" in its name is using Dark Blue background. :-)



Hovering over an item changes it to:



Hovering off, you have the same thing again.

And btw, the hardly readable text in the Header above the combo, is the Header of a syncfusion:GroupBarItem.
So you should also apply nice theme clors to that.

Changing the theme to Office2016Colorful it is slightly better readable:



But i think you should generally review the color settings in all your themes. Esspecially headers in GroupBars, DockingManager, Tab Items show the same problem over and over.
I will create an example that contains all those elements, for which i have noticed this behavior and will open a case for that.

regards,

Helmut


HW Helmut Wahrmann May 25, 2020 04:13 PM UTC

One thing to add.
The above happens when having set:

SfSkinManager.ApplyStylesOnApplication = true;

If set to false, then it looks ok.

Edit: Opened Incident 278511 and attached a sample project showing the problems


DV Duraimurugan Vedagiri Syncfusion Team May 26, 2020 04:27 PM UTC

Hi Helmut,

Thank you for your update.

We have updated the details in the incident #278511 and request you to follow-up with that incident for further details.

Regards,
Durai


HW Helmut Wahrmann May 26, 2020 09:21 PM UTC

Hi Durai,

thanks for the confirmation.
will wait for the Vol2 release.

thanks,

Helmut


DV Duraimurugan Vedagiri Syncfusion Team May 27, 2020 04:27 AM UTC

Hi Helmut,

Thanks for your update.

We will let you know once volume 2 release is successfully rolled out.

Regards,
Durai


Loader.
Up arrow icon