/// <summary> /// Gets a resource string from the ResourceManager /// </summary> /// <param name="Key">Key to retrieve in the format [ManagerName].[ResourceKey]</param> /// <returns></returns> public string this[string Key] { get { if (!validKey(Key)) { throw new ArgumentException(@"Key is not in the valid [ManagerName].[ResourceKey] format"); } if (DesignHelpers.IsInDesignModeStatic) { throw new Exception("Design mode is not supported"); } return(ResourceManagerService.GetResourceString(GetManagerKey(Key), GetResourceKey(Key))); } }
/// <summary> /// Initializes a new instance of the MainScreenViewModel class. /// </summary> public MainScreenViewModel() { // Register manager and force a refresh when bindings changed ResourceManagerService.RegisterManager(@"Strings", Localization.Strings.ResourceManager, true); }