Public Class TotalUnitsConverter
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object
Dim p As NorthwindServiceReference.Product = CType(value, NorthwindServiceReference.Product)
If (Not (p) Is Nothing) Then
Return (p.UnitsInStock + p.UnitsOnOrder)
End If
Return Nothing
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object
Throw New NotImplementedException
End Function
End Class