1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-28 00:30:09 +00:00
msfs-popout-panel-manager/MainApp/Converter/InverseBooleanOrConverter.cs
2024-02-27 21:44:21 -05:00

29 lines
788 B
C#

using System;
using System.Windows.Data;
namespace MSFSPopoutPanelManager.MainApp.Converter
{
public class InverseBooleanOrConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (values.LongLength <= 0)
return true;
foreach (var value in values)
{
if (value is true)
{
return false;
}
}
return true;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
{
return new object[] { false };
}
}
}