PageRenderTime 14ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Main/src/DynamicDataDisplay/Charts/Legend items/LegendBottomButtonIsEnabledConverter.cs

#
C# | 22 lines | 20 code | 2 blank | 0 comment | 0 complexity | 30808ecfe5940d1e8593a04e52703a73 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5using Microsoft.Research.DynamicDataDisplay.Converters;
 6using System.Windows.Controls;
 7using System.Globalization;
 8
 9namespace Microsoft.Research.DynamicDataDisplay.Charts
10{
11	internal sealed class LegendBottomButtonIsEnabledConverter : ThreeValuesMultiConverter<double, double, double>
12	{
13		protected override object ConvertCore(double value1, double value2, double value3, Type targetType, object parameter, CultureInfo culture)
14		{
15			double extentHeight = value1;
16			double viewportHeight = value2;
17			double offset = value3;
18
19			return viewportHeight < (extentHeight - offset);
20		}
21	}
22}