Dreamine.UI.Wpf 1.0.1
Dreamine.UI.Wpf 사용자 인터페이스 기능과 구성 요소를 제공합니다.
로딩중...
검색중...
일치하는것 없음
AddOffsetConverter.cs
이 파일의 문서화 페이지로 가기
1using System;
2using System.Collections.Generic;
3using System.Globalization;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7using System.Windows.Data;
8
10{
19 public class AddOffsetConverter : IValueConverter
20 {
69 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
70 {
71 if (value is double d && double.TryParse(parameter?.ToString(), CultureInfo.InvariantCulture, out double offset))
72 {
73 return d + offset;
74 }
75 return value;
76 }
77
134 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
135 => throw new NotImplementedException();
136 }
137}
object Convert(object value, Type targetType, object parameter, CultureInfo culture)
object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)