如何在自定义资源文件 (resw) 上读取/写入键/值(存储字符串和条件资源)?
我添加了用于存储应用程序设置的资源文件(resw)。接着 ?
private void button1_Click(object sender, RoutedEventArgs e)
{
ResourceContext resourceContext = ResourceContext.GetForViewIndependentUse();
ResourceMap resourceMap = ResourceManager.Current.MainResourceMap.GetSubtree("Resources");//resources.resw accessing in root is ok.
var resourceValue = resourceMap.GetValue("PicPath", resourceContext);
resourceMap.SetValue("DBPath", resourceContext,"PicPath2");//no write avaible ? ERROR LINE
}