No matter what you set, the default template will (should) override your value due to the state of Pressed CommonStates VisualStateGroup .
<VisualState x:Name="Pressed"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundBaseMediumLowBrush}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState>
Instead of setting the color, as well as the border, as you are doing right now - from the code behind, you should create your own button template by setting Background to the desired value, for example. Transparent
Herdo source share