簡體   English   中英

WP7如何在C#中添加樣式

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM