Blame view

OS.Spin/OS.Spin.View/MainWindowControls/DoubleToStringConverter.cs 631 Bytes
8ca6e89d   Tuo Wenbo   20211021
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  using System;
  using System.Windows.Data;
  
  namespace OS.Spin.View.MainWindowControls
  {
  
      public class DoubleToStringConverter : IValueConverter
      {
          //Category转换为Uri
          public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
          {
              var c = (double)value;
              return c.ToString("N");
          }
          //不会被调用
          public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
          {
              throw new NotImplementedException();
          }
      }
  }