| 12345678910111213141516171819202122 |
- using System;
- using System.Globalization;
- using System.Windows;
- using System.Windows.Data;
- namespace SWRIS.Converters
- {
- public class CollectionCountToVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is int count && count > 0)
- return Visibility.Visible;
- return Visibility.Hidden;
- }
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|