✅ Listbox issue

hey, having issues with a listbox template:
        <ListBox x:Name="PersonList" SelectionMode="Multiple">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Label Content="{Binding Name}"/>
                        <Label Content="{Binding Surname}"/>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

can you guys tell me what's wrong here?
public RemovePersonList(List<Person> personList)
{
  InitializeComponent();
  PersonList.ItemsSource = personList;
}
//How person class looks:
class Person{
public string Name;
public string Surname;
//...
}

The issue is that the items show up but they are empty
Was this page helpful?