Search code examples
wpfvb.netvisual-studiolistviewitemsource

Listview itemsource cannot see values in xaml


I have this problem with my listview itemsource, you see I'm working in WPF, and the problem comes (I think) in VB, its like blocked, this new columns I added I cannot see in xaml, the columns are there but no info, and I can see the values if I put some breakpoints in the part I specify the itemsource list, and when I do this shows up:

enter image description here

That lock there most be the cause of my problem, but I do not know how to take it off my collection list. HELP PLEASE. enter image description here

By the way I'm using properties to create a row and later bind that to xaml enter image description here


Solution

  • You can't see that property in the list view because it is marked as Private. According to the documentation all binding source properties must be marked as Public.

    Binding Sources Overview | Microsoft Docs:

    Implementing a Class for the Binding Source

    (...)

    Other Characteristics

    • The properties you use as binding source properties for a binding must be public properties of your class. Explicitly defined interface properties cannot be accessed for binding purposes, nor can protected, private, internal, or virtual properties that have no base implementation.


    The little padlock that you see on the icon doesn't mean that it's locked, it's just an indication that the property is marked as Private.