Reputation: 320
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}"
Upvotes: 0
Views: 1970
Reputation: 5633
testButton.Style = Resources["DefaultMusicButtonStyle"] as Style;
Upvotes: 3