Dreamine.UI.Wpf
1.0.1
Dreamine.UI.Wpf 사용자 인터페이스 기능과 구성 요소를 제공합니다.
Toggle main menu visibility
로딩중...
검색중...
일치하는것 없음
BoolToFontWeightConverter.cs
이 파일의 문서화 페이지로 가기
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.Data;
8
using
System.Windows;
9
10
namespace
Dreamine.UI.Wpf.Converters
11
{
20
public
class
BoolToFontWeightConverter
: IValueConverter
21
{
70
public
object
Convert
(
object
value, Type targetType,
object
parameter, CultureInfo culture)
71
{
72
if
(value is
bool
isBold && isBold)
73
return
FontWeights.Bold;
74
return
FontWeights.Normal;
75
}
76
125
public
object
ConvertBack
(
object
value, Type targetType,
object
parameter, CultureInfo culture)
126
{
127
return
value is FontWeight weight && weight == FontWeights.Bold;
128
}
129
}
130
131
}
Dreamine.UI.Wpf.Converters
Definition
AddOffsetConverter.cs:10
Dreamine.UI.Wpf.Converters.BoolToFontWeightConverter
Definition
BoolToFontWeightConverter.cs:21
Dreamine.UI.Wpf.Converters.BoolToFontWeightConverter.Convert
object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Definition
BoolToFontWeightConverter.cs:70
Dreamine.UI.Wpf.Converters.BoolToFontWeightConverter.ConvertBack
object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Definition
BoolToFontWeightConverter.cs:125
Converters
BoolToFontWeightConverter.cs
다음에 의해 생성됨 :
1.17.0