i have a problem i have some dynamic button and i want to put some style on it like my other button(Xaml button).how can i fetch the xaml code using c#? but it gives N ERROR
buttonlanguage.Style = (Style)Application.Current.FindResource("Glassbutton");
将样式放在xaml的资源部分中,然后像下面这样从代码隐藏处调用:
myDynamicButton.Style = (Style)myWindow.FindResource("myButtonStyle");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.