[英]WP7 How to add the style in C#
我在App.xaml(“ RoundButton”)中為按鈕控件創建了樣式。 我想用C#代碼創建一個按鈕,並將按鈕的樣式設置為App.xaml文件中創建的按鈕。 是否有可能做到這一點?
Button btn = new Button();
btn.Style= (Style)App.Current.Resources["RoundButton"];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.