MCI18n/Converters.cs

19 lines
511 B
C#
Raw Permalink Normal View History

2025-06-22 11:33:58 +08:00
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace MCI18n;
public class NullToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value != null ? Visibility.Visible : Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}