I am trying to set style to button programmatically in C#, i tried it but not done it, i set style to button in XAML so its working fine. But in C# programmatically m not sure how to do it..
In XAML i did like this
Style="{StaticResource DefaultMusicButtonStyle}"
testButton.Style = Resources["DefaultMusicButtonStyle"] as Style;