JosephGarrone
JosephGarrone

Reputation: 4161

The name "DoublerConvert" does not exist in Namespace "clr-...."

I realise that there are other questions with the same title, however I have tried all of those solutions to no avail. I am trying to use a converter that I have made. My other converter works fine, and this new one is a copy paste of the previous one, with the name changed, and the return value changed.

XAML

xmlns:local="clr-namespace:ARC"
    <local:DoublerConvert x:Key="DoubleConverter"/> 'Doesn't work
    <local:ValueConverter x:Key="NegativeConverter"/> 'Works fine

CODE

Public Class ValueConverter
    Implements IValueConverter

    Public Function ProvideValue(serviceProvider As System.IServiceProvider) As Object
        Return Me
    End Function

    Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
        Dim OldWidth As Integer = value
        OldWidth = -OldWidth
        Return OldWidth
    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

Public Class DoublerConvert
    Implements IValueConverter

    Public Function ProvideValue(serviceProvider As System.IServiceProvider) As Object
        Return Me
    End Function

    Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
        Dim OldWidth As Integer = value
        Return 2 * OldWidth
    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

Upvotes: 3

Views: 5272

Answers (2)

Vasilii Ruzov
Vasilii Ruzov

Reputation: 554

I got the same error in c#. I've read so much information about this problem. So what did i do to fix it? I ran clean project and then built project. VS showed me the error list and i fixed each error! each! after that my solution built successfully! hope it will work for you!

Upvotes: 0

David Dao
David Dao

Reputation: 196

You try to kill XDesProc.exe and reload your xaml.

Upvotes: 18

Related Questions