I have data templates that looks like:
<DataTemplate>
<TextBlock DataContext="{Binding Fields[ABC]}" Text="{Binding}"/>
</DataTemplate>
<DataTemplate>
<TextBlock DataContext="{Binding Fields[)]}" Text="{Binding}"/>
</DataTemplate>
For a class that looks like
class Source {
public Dictionary<string, string> Fields { get; private set; }
}
When applying the second template, with the ')' key in the DataContext binding, I get a XamlParseException. Is there any way to allow Dictionary Binding to work with other strings such as ')' ? Some sort of escape character sequence?