20 lines
487 B
C#
20 lines
487 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace AxCopilot.Themes;
|
|
|
|
public class NullToCollapsedConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type t, object p, CultureInfo c)
|
|
{
|
|
return (!(value is string value2) || string.IsNullOrEmpty(value2)) ? Visibility.Collapsed : Visibility.Visible;
|
|
}
|
|
|
|
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|