diff options
Diffstat (limited to 'ShiftOS.Wpf/SkinFrontend.cs')
| -rw-r--r-- | ShiftOS.Wpf/SkinFrontend.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ShiftOS.Wpf/SkinFrontend.cs b/ShiftOS.Wpf/SkinFrontend.cs new file mode 100644 index 0000000..3e8cd73 --- /dev/null +++ b/ShiftOS.Wpf/SkinFrontend.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; +using ShiftOS.Engine; +using static ShiftOS.Engine.SkinEngine; +namespace ShiftOS.Wpf +{ + public class SkinFrontend : FrameworkElement + { + public Brush GetDesktopBrush() + { + try + { + return new ImageBrush(LoadedSkin.DesktopBackgroundImage.ToBitmapImage()); + } + catch + { + if (LoadedSkin != null) + { + return LoadedSkin.DesktopColor.CreateBrush(); + } + else + { + return new Skin().DesktopColor.CreateBrush(); + } + } + } + } +} |
