开发者

WP7 How to add the style in C#

开发者 https://www.devze.com 2023-02-26 09:23 出处:网络
I have 开发者_开发百科created a style for button control in App.xaml(\"RoundButton\"). I want to create a button in C# code and set the style of the button to the one created in App.xaml file. Is it p

I have 开发者_开发百科created a style for button control in App.xaml("RoundButton"). I want to create a button in C# code and set the style of the button to the one created in App.xaml file. Is it possible to do this?


Button btn = new Button();
btn.Style= (Style)App.Current.Resources["RoundButton"];
0

精彩评论

暂无评论...
验证码 换一张
取 消