vendredi 26 mars 2021

How to get ResourceManager from AttachedProperty

I want to get ResourceManager with the help of an AttachedProperty from the user Consider the following code:

<window:

xmlns=res="clr-namespace:WpfApp11.ResourceFolder"
myAttach.ResourceName="res.Strings.resx"
/>

Now I want res.Strings.resx to become ResourceManager

public OnResourceNameChanged(...)
{
   ResourceManager res = GetResourceManager("res.Strings.resx");
   res.GetObject(key);
}

How should this be done?





Aucun commentaire:

Enregistrer un commentaire