I want to bind to the Count/amount of items within my DataContext.
I have an object, lets say person which has a List
as a property. I would
To expand on tehMick's answer with functional sample code:
XAML:
addresses
Code Behind:
namespace Sandbox.Wpf.PropertyCount
{
///
/// Interaction logic for PropertyCount.xaml
///
public partial class PropertyCount : Window
{
public PropertyCount()
{
InitializeComponent();
this.DataContext = new Model();
}
}
public class Model
{
public List People { get; private set; }
public Model()
{
People = new List{
new Person ("joe", new List