Files
Wino-Mail/Wino.Shared.WinRT/Extensions/ElementThemeExtensions.cs

42 lines
1.0 KiB
C#
Raw Permalink Normal View History

using Wino.Domain.Enums;
#if NET8_0
using Microsoft.UI.Xaml;
#else
2024-07-20 23:32:39 +02:00
using Microsoft.UI.Xaml;
#endif
2024-04-18 01:44:37 +02:00
namespace Wino.Shared.WinRT.Extensions
2024-04-18 01:44:37 +02:00
{
public static class ElementThemeExtensions
{
public static ApplicationElementTheme ToWinoElementTheme(this ElementTheme elementTheme)
{
switch (elementTheme)
{
case ElementTheme.Light:
return ApplicationElementTheme.Light;
case ElementTheme.Dark:
return ApplicationElementTheme.Dark;
}
return ApplicationElementTheme.Default;
}
public static ElementTheme ToWindowsElementTheme(this ApplicationElementTheme elementTheme)
{
switch (elementTheme)
{
case ApplicationElementTheme.Light:
return ElementTheme.Light;
case ApplicationElementTheme.Dark:
return ElementTheme.Dark;
}
return ElementTheme.Default;
}
}
}