Imports System.Globalization
Imports System.Windows.Data

Public Class StatusToIconConverter
    Implements IValueConverter

    Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
        ' This is the code to convert the string to an icon resource.
        If TypeOf value Is LinkSiteStatus Then
            Dim status = CType(value, LinkSiteStatus)

            If status = LinkSiteStatus.Added Then
                Return "pack://application:,,,/Resources/added.png"
            ElseIf status = LinkSiteStatus.Ignored Then
                Return "pack://application:,,,/Resources/ignored.png"
            ElseIf status = LinkSiteStatus.New Then
                'Return "pack://application:,,,/Resources/new.png"
                Return Nothing
            Else
                Return Nothing
            End If

        End If

        Return Nothing
    End Function

    Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
        Throw New NotImplementedException()
    End Function

End Class
