var resourceLoader = new ResourceLoader(); //A.Name.Header //A/Name/Header var string = resourceLoader.GetString("A/Name/Header");
string resourNameToFind = "String2"; // Replace with name to find ResourceMap namedResourceMap = Windows.ApplicationModel.Resources.Core.ResourceManager.Current.MainResourceMap; foreach (KeyValuePair<string, NamedResource> resNameToNamedResourcePair in namedResourceMap) { if (resNameToNamedResourcePair.Key.EndsWith(resourNameToFind)) // Either check or just iterate. { IReadOnlyList<ResourceCandidate> lstResCandidates = resNameToNamedResourcePair.Value.ResolveAll(); foreach (ResourceCandidate resCandidate in lstResCandidates) { string value = resCandidate.ValueAsString; // Value of actual resource string in resw. } } }
var stream = this.GetType().GetTypeInfo().Assembly.GetManifestResourceStream("APP_NAME.FOLDER_NAME.Logo3.png");var stream = this.GetType().GetTypeInfo().Assembly.GetManifestResourceStream("TestApp2.Assets.Logo3.png");
var stream = this.GetType().GetTypeInfo().Assembly.GetManifestResourceStream("APP_NAME.FOLDER_NAME.Logo3.png");
string[] names = this.GetType().GetTypeInfo().Assembly.GetManifestResourceNames();
Sachin S edited Revision 3. Comment: Added using statement - using System.Reflection;
Sachin S edited Revision 1. Comment: Updated title