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. Image for the cookie policy date
close icon

Styling SfCalculator

Hi,

Is there a way to override the current style of the SfCalculator. In the documentation, I found information about some controls but not SfCalculator.

9 Replies

MS Magesh Sankar Syncfusion Team August 26, 2019 12:31 PM UTC

Hi Michael,  
  
Thanks for contacting Syncfusion support. 
 
Currently we are working to prepare the sample as per your requirement and we will update more details on tomorrow 27th August 2019. 
 
Regards 
Magesh S 



KP Kanniyappan Panneer Selvam Syncfusion Team August 28, 2019 03:38 AM UTC

Hi Michael, 
  
Sorry for the inconvenience caused. 
 
Currently we are working on your queries with high priority at our end and we will provide more details on 28th August 2019. 
 
We appreciate your patience until then. 
  
Regards, 
Kanniyappan P  



KP Kanniyappan Panneer Selvam Syncfusion Team August 28, 2019 05:07 AM UTC

Hi Michael, 
 
Thanks for your patience. 
 
We have checked your query “Override the current style of the SfCalculator” at our end. We have prepared the sample based on your requirement. In our sample, we have overrides the default style and function panel style of SfCalculator. Please find the screenshot and sample for the same. 
 
Screenshot: 
 
 
 
 
Please try the above solution and let us know if it is helpful. 
 
Regards, 
Kanniyappan P 



MI Michael August 28, 2019 06:50 AM UTC

Hi,

This solution is almost what I want. Almost, because I can't change CalculatorButton's Background property (setting this doesn't change anything, even after Clean and Rebuild operations).


KP Kanniyappan Panneer Selvam Syncfusion Team August 29, 2019 05:54 AM UTC

Hi Michael, 
 
Thanks for your update. 
 
We have checked your query and modified the sample based on your requirement. In our sample, we have added the CalendarButton, DisplayPane and InputPane styles for the SfCalculator. Please find the modified sample and screenshot for the same.  
 
Screenshot: 
 
 
 
 
Please try the above solution and let us know if it is helpful. 
 
Regards, 
Kanniyappan P 



MI Michael August 31, 2019 12:53 PM UTC

Hi,

I wasn't very accurate but I would like to change the background color of a single button, not all of them.


KP Kanniyappan Panneer Selvam Syncfusion Team September 2, 2019 08:00 AM UTC

Hi Michael, 
 
Thanks for your update. 
 
We have checked your query “Change the background color of a single calculator button” at our end. We have achieved your requirement by customizing the background color for individual calendar buttons. Please find the code snippet, screenshot and sample for the same. 
 
Code Snippet: 
 
<Setter Property="Foreground" Value="#FFFFFFFF"/> 
 
<input:CalculatorButton x:Name="PART_Button1" BrushOpacity="0.3" Content="{Binding MC, Source={StaticResource ResourceWrapperKey}}" Grid.Column="0" Function="MemoryClear" Background="Yellow" Foreground="Red" FontSize="15" IsTabStop="False"/> 
 
                            <input:CalculatorButton x:Name="PART_Button2" BrushOpacity="0.3" Content="{Binding MR, Source={StaticResource ResourceWrapperKey}}" Grid.Column="1" Function="MemoryRecall"  Background="Blue" Foreground="{TemplateBinding Foreground}" FontSize="15" IsTabStop="False"/> 
 
<input:CalculatorButton x:Name="PART_Button3" BrushOpacity="0.3" Content="{Binding MS, Source={StaticResource ResourceWrapperKey}}" Grid.Column="2" Function="Memory" Background="Green" Foreground="{TemplateBinding Foreground}" FontSize="15" IsTabStop="False"/> 
 
                            <input:CalculatorButton x:Name="PART_Button4" BrushOpacity="0.3" Content="{Binding MPLUS, Source={StaticResource ResourceWrapperKey}}" Grid.Column="3" Function="MemoryAdd" Background="Orange" Foreground="{TemplateBinding Foreground}" FontSize="15" IsTabStop="False"/> 
                             
 
  
Screenshot:  
 
 
 
 
Please try the above solution and let us know if it is helpful. 
 
Regards, 
Kanniyappan P 



MI Michael September 2, 2019 04:38 PM UTC

Hi,

Thank you so much. It's all I needed.


SS Sarasilmiya Shahul Hameed Syncfusion Team September 3, 2019 10:07 AM UTC

Hi Michael, 
  
Most welcome. Please get back to us if you need further assistance. 
  
Regards, 
Sara 


Loader.
Live Chat Icon For mobile
Up arrow icon