IntToPathDataConverter.cs 950 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Data;
  8. using System.Windows.Media;
  9. namespace CyberX8_MainPages.Converters
  10. {
  11. public class IntToPathDataConverter : IValueConverter
  12. {
  13. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  14. {
  15. var item = (int)value;
  16. if (item == 4)
  17. {
  18. return Application.Current.Resources["Icon_Resume"] as Geometry;
  19. }
  20. else
  21. {
  22. return Application.Current.Resources["Icon_Pause"] as Geometry;
  23. }
  24. }
  25. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  26. {
  27. return null;
  28. }
  29. }
  30. }