using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; using Tango.Core; using Tango.PPC.Jobs.Models; namespace Tango.PPC.Jobs.Converters { public class FirstValueCollectionConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if(value is SynchronizedObservableCollection) { SynchronizedObservableCollection list = value as SynchronizedObservableCollection; if(list.Count >= 1) { return list[0]; } } return null; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }