We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add style to existing button style by using property BasedOn

Thread ID:

Created:

Updated:

Platform:

Replies:

145305 Jun 17,2019 07:36 AM UTC Jun 18,2019 10:42 AM UTC WPF 1
loading
Tags: SfDataGrid
Amit
Asked On June 17, 2019 07:36 AM UTC

I am using ChromelessWindow for my WPF application. I have added a style resources like this:

<ResourceDictionary Source="/Syncfusion.SfGrid.WPF;component/Styles/Styles.xaml" />


Now I want to add some more style to button like padding e.t.c to exising style using BasedOn property.

<Style TargetType="Button" x:Key="CustomButtonStyle" BasedOn="--------">
                <Setter Property="Padding" Value="20, 10"/>
                <Setter Property="HorizontalAlignment" Value="Left"/>
</Style>


But don't know what is the name of default style.


Attachment: SyncfusionWpfApp1_e7ce3786.zip

Jagadeesan Pichaimuthu [Syncfusion]
Replied On June 18, 2019 10:42 AM UTC

Hi Amit, 
  
Thanks for using Syncfusion product. 
  
We don’t have any styles for MS Button, so no need for BasedOn property. You can apply the style for a Button, as per the below code it will works. 
  
Please refer the below code snippet,  
<Style TargetType="Button" x:Key="CustomButtonStyle" > 
    <Setter Property="Padding" Value="20, 10"/> 
    <Setter Property="Background" Value="Red"/> 
    <Setter Property="HorizontalAlignment" Value="Left"/> 
</Style> 
  
 Please refer the below screen shot for your reference, 
 
  
 
Let us know whether this helps also if you need any further assistance on this.  
 
Regards, 
Jagadeesan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon