Analysis-Services/MetadataTranslator/Metadata Translator/Converters/CollectionEmptyTrueFalseConverter.cs
2021-02-24 17:34:03 -08:00

27 lines
754 B
C#

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Dynamic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace Metadata_Translator
{
public class CollectionEmptyTrueFalseConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (value is ObservableCollection<ExpandoObject> collection) ? collection.Count > 0 : false;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}