Relate control to the flight of property?

I'm having trouble binding one of my controls to a shielded property. The JSON data I pull into my application has a value that uses the reserved C # event keyword. To get around this in my class, I escaped event with the @ sign.

public string @event { get; set; }

But when I move on to binding this property to one of my controls, it doesn't seem to work

<TextBlock> Text="{Binding @event}" />

How do I make this work?

+5
source share
1 answer

An event is a C # keyword that has nothing to do with XAML, so just "{Binding event}". Property change notification can also be used.

0
source

All Articles