using System;
using Windows.UI.Xaml.Data;

namespace DataBinding.Converters
{
    public class TextConverter : IValueConverter 
    {
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            var val = value ?? true;
            bool truth;
            Boolean.TryParse(val.ToString(), out truth);
            return truth ?
              "Prawda cię wyzwoli." :
              "Czy fałsz jest tak silny?";
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}