using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;

namespace Valg.EVA.Skanning.Assets.Converter
{
    public class ContentToMarginConverter : IValueConverter
    {
        private static readonly ContentToMarginConverter value = new ContentToMarginConverter();

        public static ContentToMarginConverter Value
        {
            get { return value; }
        }

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return new Thickness(0, 0, -((ContentPresenter)value).ActualHeight, 0);
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
