IsShowConvert.cs 635 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Windows;
  3. using System.Windows.Data;
  4. namespace Muchinfo.PC.Common.Converter
  5. {
  6. public class IsShowConverter : IValueConverter
  7. {
  8. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  9. {
  10. if (value.Equals(true))
  11. return Visibility.Visible;
  12. else return Visibility.Collapsed;
  13. }
  14. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  15. {
  16. throw new NotImplementedException();
  17. }
  18. }
  19. }