终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 rivejä
791 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows.Data;
  8. namespace BPASmartClient.MorkCL.Converter
  9. {
  10. /// <summary>
  11. /// 根据Bool的值获取Visibility,为True时返回Visible,反之,返回Collapsed。
  12. /// </summary>
  13. public class Bool2VisibilityConverter : IValueConverter
  14. {
  15. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  16. {
  17. return (bool)value?Visibility.Visible:Visibility.Collapsed;
  18. }
  19. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  20. {
  21. throw new NotImplementedException();
  22. }
  23. }
  24. }