Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Binding a ListView to all public properties of a class : possible?

$
0
0

Hello,

Is there a way to bind a ListView to a list of properties in a class? Let's say we want to display a list of the characteristics of a company. The BindingContext is already set to the company in question.

Lets's say we have this company class:

class Company
{
    public string Name
        { get; set; }

    public string Address
    { get; set; }
}

How can we do something like this:

<ListView BindingContext="{Binding Company.Properties}">

So that we can easily list all of the company properties(Name and Address) without having as many labels as the number of properties?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>