Hi Dean,
We are in progress of updating the documentation for theming support and it will be updated online before the end of January 2019. However, you can follow the below steps to apply theme for the Syncfusion controls.
You can apply the predefined common theme for all the Syncfusion controls using SyncfusionThemeDictionary by creating the instance for SyncfusionThemeDictionary and merge the common theme resources as in the following code snippet.
Code snippet for common theme:
<Application.Resources> <syncTheme:SyncfusionThemeDictionary> <syncTheme:SyncfusionThemeDictionary.MergedDictionaries> <syncTheme:LightTheme /> </syncTheme:SyncfusionThemeDictionary.MergedDictionaries> </syncTheme:SyncfusionThemeDictionary> </Application.Resources> |
You can also override the values for the predefined keys as needed after merging the common theme resources as shown below.
<Application.Resources> <syncTheme:SyncfusionThemeDictionary> <syncTheme:SyncfusionThemeDictionary.MergedDictionaries> <syncTheme:LightTheme /> <ResourceDictionary> <Color x:Key="SyncPrimaryColor">Green</Color> <Color x:Key="SyncErrorColor">#FF9000</Color> <Color x:Key="SfTextInputLayoutHintColor">Maroon</Color> </ResourceDictionary> </syncTheme:SyncfusionThemeDictionary.MergedDictionaries> </syncTheme:SyncfusionThemeDictionary> </Application.Resources> |
Please find the list of available keys in the attached file which can be used to override the default values.
It contains common keys such as SyncPrimaryColor, SyncPrimaryLightColor, SyncPrimaryDarkColor, SyncPrimaryForegroundColor, SyncPrimaryLightForegroundColor, SyncPrimaryDarkForegroundColor, SyncSuccessColor, SyncErrorColor, SyncWarningColor and SyncInfoColor for all Syncfusion UI controls which are mapped to specific UI element of the controls. Other than these items, there are other keys specific to every control like SfTextInputLayoutHintColor for SfTextInputLayout. You can use these keys to override the default values.
We have prepared a sample with SfTextInputLayout by overriding primary color and error color and hint color of SfTextInputLayout. Please download the sample from the following link.
Screenshot:
Regards,
Divya Venkatesan