Hello,
Welcome to Microsoft Q&A!
I tried to make a sample which could reproduce your scenario based on your description. An app with a class library.
In such scenario, if you want to get resource from other packages, you will need to accessed through the package's own top-level ResourceMap that's accessible from the ResourceManager.
So you could try the following code instead of creating a ResourceManager
with a specific file:
private void myButton_Click(object sender, RoutedEventArgs e)
{
var resourceManager = new Microsoft.Windows.ApplicationModel.Resources.ResourceManager();
var str = resourceManager.MainResourceMap.GetValue("TestLibrary/Resources/TextureRendererVS").ValueAsString;
myButton.Content = str;
}
You could get more information here: Loading strings from other packages and ResourceMap Class
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.