From f30dcf5ef41d54c588d7b42c48be8d941abba72e Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 8 Jan 2017 09:57:10 -0500 Subject: Initial upload --- ShiftOS.Wpf/SkinFrontend.cs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ShiftOS.Wpf/SkinFrontend.cs (limited to 'ShiftOS.Wpf/SkinFrontend.cs') 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(); + } + } + } + } +} -- cgit v1.2.3