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

ToolConverter.cs 581B

12345678910111213141516171819
  1. using System;
  2. using System.Windows;
  3. using System.Windows.Data;
  4. namespace ComeCapture.Converters
  5. {
  6. public class ToolConverter : IValueConverter
  7. {
  8. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  9. {
  10. return value.ToString() == parameter.ToString() ? Visibility.Visible : Visibility.Collapsed;
  11. }
  12. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  13. {
  14. return null;
  15. }
  16. }
  17. }