mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
22 lines
592 B
C#
22 lines
592 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace Artemis.UI.Converters
|
|
{
|
|
public class NullToImageConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value == null)
|
|
return DependencyProperty.UnsetValue;
|
|
return value;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
return Binding.DoNothing;
|
|
}
|
|
}
|
|
} |