I'm trying to dynamically add buttons to a list in WPF. After doing some research I came to this piece of code:

```
   <Button Content="Add New Button"
        VerticalAlignment="Center" HorizontalAlignment="Center"
        Command="{Binding AddNewButton}"/>
    <ItemsControl ItemsSource="{Binding ButtonsList}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <WrapPanel IsItemsHost="True"/>
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <Button Content="{Binding Title}"
                    Margin="2"/>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>

```

Then I want to write something on the code to make this work.. since all answers I found about this only include the XAML for the solution, and not the code behind. I come from a web background so I'm totally new to WPF.. but I am thinking something like this:

```
public void AddNewButton(){
 ButtonsList.add({title='New button Title});
}

```

I know the syntax is wrong, I just wanted to try to express the code I'm thinking of.. something simple.. How could this work?