Anton Duzenko Anton Duzenko - 3 years ago 192
C# Question

Why Xamarin.Forms bindings do not work with default accessors?

I have a property

public List<WebApi.UserChatRto> Chats {
get; set;

that I bind to a ListView

<ListView ItemsSource="{Binding Chats}">

That works. Now if I change the property declaration to

public List<WebApi.UserChatRto> Chats;

the listview will be empty.

Answer Source

Binding only works with properties, not with fields.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download