26 lines
No EOL
713 B
C#
26 lines
No EOL
713 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace DjRedo.Converters
|
|
{
|
|
public class TrueToCollapseConverter : IValueConverter{
|
|
/// <inheritdoc />
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value is bool v)
|
|
{
|
|
return v ? Visibility.Collapsed : Visibility.Visible;
|
|
}
|
|
|
|
return Visibility.Collapsed;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
} |