using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; namespace ComPDFKit.Controls.Common { public class HomePageFileListHeightConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { if (values[0] == null || values[1] == null) { return false; } else { var value = (double)values[0] - (double)values[1] - 32; return (value >= 200.0) ? value : 200.0; } } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { return null; } } }