1234567891011121314151617181920212223242526272829 |
-
- namespace HistoryView.Converters;
- public class CollectionToVisibility : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- dynamic d = value;
- try
- {
- if (d.Count == 0)
- {
- return Visibility.Collapsed;
- }
- }
- catch
- {
- }
- return Visibility.Visible;
- }
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
|