mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 19:24:55 +08:00
33 lines
913 B
C#
33 lines
913 B
C#
// 2025/6/23 by Zhe Fang
|
|
|
|
using System;
|
|
using Microsoft.UI.Xaml;
|
|
using Microsoft.UI.Xaml.Data;
|
|
|
|
namespace BetterLyrics.WinUI3.Converter
|
|
{
|
|
public partial class MatchedLocalFilesPathToVisibilityConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, string language)
|
|
{
|
|
if (value is string path)
|
|
{
|
|
if (path == App.ResourceLoader!.GetString("MainPageNoLocalFilesMatched"))
|
|
{
|
|
return Visibility.Collapsed;
|
|
}
|
|
else
|
|
{
|
|
return Visibility.Visible;
|
|
}
|
|
}
|
|
return Visibility.Collapsed;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|