21 lines
469 B
C#
21 lines
469 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
|
|
namespace SWS.CAD.Services
|
|
{
|
|
public interface IResourceService
|
|
{
|
|
Style GetStyle(string key);
|
|
}
|
|
|
|
public class ResourceService : IResourceService
|
|
{
|
|
public Style GetStyle(string key) =>
|
|
Application.Current == null ? null : Application.Current.TryFindResource(key) as Style;
|
|
}
|
|
}
|