1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Public Class HeaderConverter
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
Dim myValue As Boolean = DirectCast(value, Boolean)
If (myValue = True) Then
Return System.Windows.FontWeights.Bold
Else
Return System.Windows.FontWeights.Normal
End If
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
Throw New NotImplementedException
End Function
End Class |
Partager