I have a converter in the code behind called StringToIntConverter I try using it in xaml binding like this where s is the project namespace:
Converter={s:StringToIntConverter}
But it says that it is missing an assembly reference. What am I doing wrong?
I know there is some way to put it as a resource and then reference the resource but I am not sure how to do it.
Curly braces indicate a markup extension, they cannot just be used arbitrarily to instantiate objects, but for convenience you could turn your converter into a markup extension.
Something like:
Then the code you used would work just fine!
Also note that you could use the binding in XML-element syntax to instantiate converters in place as well, e.g.