aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Wpf/SkinFrontend.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-01-08 09:57:10 -0500
committerMichael <[email protected]>2017-01-08 09:57:10 -0500
commitf30dcf5ef41d54c588d7b42c48be8d941abba72e (patch)
tree7705f99b965673b1c034ac2b1c56e65072c827df /ShiftOS.Wpf/SkinFrontend.cs
parent69dfad54724d4176dfce238a8d7e73970e6eef24 (diff)
downloadshiftos_thereturn-f30dcf5ef41d54c588d7b42c48be8d941abba72e.tar.gz
shiftos_thereturn-f30dcf5ef41d54c588d7b42c48be8d941abba72e.tar.bz2
shiftos_thereturn-f30dcf5ef41d54c588d7b42c48be8d941abba72e.zip
Initial upload
Diffstat (limited to 'ShiftOS.Wpf/SkinFrontend.cs')
-rw-r--r--ShiftOS.Wpf/SkinFrontend.cs33
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();
+ }
+ }
+ }
+ }
+}