开发者

How to access application resources in code, c#, wp7

I know you can access page resources by using the following code:

btn.Style = Resource开发者_Python百科s["ButtonStle"] as Style;

But how do you access an application wide resource?


You can access the application through the static Application.Current property.

btn.Style = Application.Current.Resources["ButtonStyle"] as Style;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜