The reason for the explained issue is that the other VisualStates of the ButtonChrome
are missing and they have been used in the code. So in order to get it working you will need to include everything from the default template and modify it the desired way.
However if you need to optimize the performance by removing the animations of the ButtonChrome
, I can suggest you a better approach. What I can do is to replace the ButtonChrome
with Borders in the Template of the CalendarButton and modify the VisualStates as required (that approach is used in the Windows8 Theme so you can extract the template from there). For your convenience I have prepared a sample project which demonstrates the exact approach - you will just need to adjust the brushes and colors there. Note that I have used Implicit Styles
in the project.
Hope this will help you to achieve the required.
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos
and start improving your app based on facts, not hunches.