开发者

can i fetch the xaml button style on my dynamic button?

开发者 https://www.devze.com 2023-01-03 06:47 出处:网络
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

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)Ap开发者_StackOverflowplication.Current.FindResource("Glassbutton");


Put your style in the resources section in xaml and call from code-behind like this:

myDynamicButton.Style = (Style)myWindow.FindResource("myButtonStyle");
0

精彩评论

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

关注公众号