开发者

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

开发者 https://www.devze.com 2023-03-06 03:43 出处:网络
I know you can access page resources by using the following code: btn.Style = Resource开发者_Python百科s[\"ButtonStle\"] as Style;

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

精彩评论

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