12345678910111213141516171819202122232425262728 |
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Data;
- namespace ComPDFKit.Controls.Common
- {
- public class HeightToTopMarginConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is double height)
- {
- return new Thickness(0, height + 3, 0, 0);
- }
- return new Thickness(0);
- }
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
- }
- }
|