How to create a global style for controls

Hello,

I am having trouble understanding how to create a custom style for the Syncfusion controls? Can you show me an example of how to do achieve this?
I want to create this custom style in a separate xaml file that contains just a resource dictionary which i include in App.xaml. 

1 Reply 1 reply marked as answer

SP Sakthivel Palaniyappan Syncfusion Team July 21, 2020 11:41 AM UTC

 Hi Erol,

Greetings from Syncfusion.

We have prepared a sample with the Theme Style mentioned in separate Page and defining it in App.xaml. Please use the below code snippet and sample,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Theme749605552

Code Snippet:

 
 <Application.Resources> 
        <ResourceDictionary> 
            <Style TargetType="Page" ApplyToDerivedTypes="True"> 
                <Setter Property="BackgroundColor" Value="{DynamicResource PageBackgroundColor}" /> 
            </Style> 
        </ResourceDictionary> 
  </Application.Resources> 

Please check with the above and let us know if you have any concerns.


Regards,
Sakthivel P.
 


Marked as answer
Loader.
Up arrow icon