tags:

views:

54

answers:

1

I'm trying to do this:

<TextBlock Text="{Binding Path=Text, 
           Converter={StaticResource stringFormatConverter}, 
           ConverterParameter='\"{0}\"'}" />

But this is apparently not the way to get a quote into a XAML binding string.

What is the appropriate way to get "\"{0}"\" to work here?

+3  A: 

You have two options:

"&quot;{0}&quot;"
'"{0}"'

This is explained here: http://msdn.microsoft.com/en-us/library/ms748250.aspx

In your example (I couldn't see what you were trying to do at first), you'll probably want to do:

...='&quot;{0}&quot;'
Daniel Martin
The second one wouldn't compile for me. Let's see how the first does...
Alex Baranosky
ahhh... I need some sleep! I misstyped " as @quot; The " works, thanks a ton for the help.
Alex Baranosky