在Silverlight中将动态按钮引用到staticresource [英] Reference dynamic button to staticresource in silverlight
问题描述
在WPF中,您可以找到资源来查找静态资源,如下所示:
按钮b = 新 Button();
b.Style =(Style)FindResource(" );
这篇关于在Silverlight中将动态按钮引用到staticresource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
我正在WP7/Silverlight中尝试执行相同的操作,但是FindResource不可用.有没有办法将我动态创建的按钮引用到staticresource?请帮忙.
在此先谢谢您! -style-more-then-once-in-silverlight-20-application/> http://khason.net/blog/findresource-replacement-and-to-to-to-to-to-to-to-to-to-to-change-control-style-more-then-once -in-silverlight-20-application/ [Button b = new Button();
b.Style = (Style)FindResource("CustomButton");
I''m trying to do the same in WP7/Silverlight but FindResource is unavailable. Is there a way to reference the button that I created dynamically to a staticresource? Please help.
Thanks in advance!See http://khason.net/blog/findresource-replacement-and-how-to-change-control-style-more-then-once-in-silverlight-20-application/[^]
BTW you would have hit upon that blog within the first page of a reasonably well-worded google search.