IOView.xaml.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace Venus_MainPages.Views
  17. {
  18. /// <summary>
  19. /// IOView.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class IOView : UserControl
  22. {
  23. public IOView()
  24. {
  25. InitializeComponent();
  26. }
  27. }
  28. public class DisplayNameConverter : IValueConverter
  29. {
  30. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  31. {
  32. if (value is string s1)
  33. {
  34. int idx = s1.IndexOf('_');
  35. return s1.Substring(idx + 1);
  36. }
  37. return value;
  38. }
  39. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  40. {
  41. throw new NotImplementedException();
  42. }
  43. }
  44. }