mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-23 02:12:14 +00:00
34 lines
822 B
C#
34 lines
822 B
C#
|
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();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|