using Microsoft.UI.Xaml.Data; using Microsoft.UI.Xaml; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace VDownload.GUI.Converters { public class StringToVisibilityConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { if (value is not string str || string.IsNullOrWhiteSpace(str)) { return Visibility.Collapsed; } else { return Visibility.Visible; } } public object ConvertBack(object value, Type targetType, object parameter, string language) { throw new NotImplementedException(); } } }