A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
652 B

using Avalonia.Platform;
namespace Avalonia.UnitTests;
public class TestPlatformSettings(PlatformThemeVariant themeVariant)
: DefaultPlatformSettings
{
private PlatformColorValues _colorValues = new() { ThemeVariant = themeVariant };
public override PlatformColorValues GetColorValues() => _colorValues;
public PlatformThemeVariant ThemeVariant
{
get => _colorValues.ThemeVariant;
set => SetColorValues(_colorValues with { ThemeVariant = value });
}
public void SetColorValues(PlatformColorValues colorValues)
{
_colorValues = colorValues;
OnColorValuesChanged(colorValues);
}
}