using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; namespace BPA.UIControl.Converters { /// /// 获取 Canvas 中心点 /// public class GetCanvasCentreConverter : IMultiValueConverter { /// public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { return ((double)values[0] - (double)values[1]) / 2; } /// public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { return null; } } }