15 lines
476 B
C#
15 lines
476 B
C#
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace ytLive.Helpers;
|
|
|
|
public class NotNullToVisibilityConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
=> value != null ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
=> value is Visibility.Visible;
|
|
}
|