using System;
using System.Windows.Data;
using System.Windows.Media;

namespace CyberX8_MainPages.Converters
{
    public class IsOnlineToOpacityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var item = (bool)value;
            if (item == true)
            {
                return 1;
            }
            else
            {
                return 0.4;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return null;
        }
    }
}