Files
BetterLyrics/BetterLyrics.WinUI3/BetterLyrics.WinUI3/Converter/BoolToPartialOpacityConverter.cs
Zhe Fang 4926fe55a3 chores:
- Add album text in lyrics render
- Improve song info update and draw algo
- Upgrade to .NET 10
2025-11-12 19:15:19 -05:00

23 lines
594 B
C#

using Microsoft.UI.Xaml.Data;
using System;
namespace BetterLyrics.WinUI3.Converter
{
public class BoolToPartialOpacityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is bool boolValue)
{
return boolValue ? 1.0 : 0.3;
}
return 1.0;
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
}