Poison的博客

导航

win10 uwp 读取resw资源文件

 ResourceContext resourceContext = ResourceContext.GetForViewIndependentUse();
                ResourceMap resourceMap = Windows.ApplicationModel.Resources.Core.ResourceManager.Current.MainResourceMap.GetSubtree("my");
                // Here you load the resource you need
                var resourceValue = resourceMap.GetValue("Sql4Test", resourceContext);
                d.sql = resourceValue.ValueAsString;

ps:[my]是新建的my.resw资源文件

posted on 2017-09-16 18:28  632575987  阅读(663)  评论(0编辑  收藏  举报