星火微课系统客户端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Windows.Data;
  3. namespace ComeCapture.Converters
  4. {
  5. public class SizeConverter : IValueConverter
  6. {
  7. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  8. {
  9. return int.Parse(value.ToString()) == int.Parse(parameter.ToString());
  10. }
  11. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  12. {
  13. if ((bool)value)
  14. {
  15. return parameter;
  16. }
  17. else
  18. {
  19. return null;
  20. }
  21. }
  22. }
  23. }