I'm new in WPF, following MVVM pattern. trying to create dll, I have defined some resource strings in resourcedictionary, able to access it in xaml file but i need to access it in viewmodel. searched on net and found that there is one method TryFindResource() but this method is in application context, how can i use it in viewmode?
Thanks
Hi you can have a static class like this below, this static class will have the reference of your resourceDIctionary, through this you can access the resources in the resource dictionary from your viewmodel.
You can get the resources from the viewmodel like this. Ex: