| 12345678910111213141516171819202122232425 |
- using System.Windows;
- namespace Muchinfo.MTPClient.Data.Helper
- {
- internal class ResourceHelper
- {
- /// <summary>
- /// Gets the from resource.
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="resourceName">Name of the resource.</param>
- /// <returns>``0.</returns>
- internal static T GetFromResource<T>(string resourceName) where T : class
- {
- try
- {
- return (T)Application.Current.TryFindResource(resourceName);
- }
- catch
- {
- return null;
- }
- }
- }
- }
|