I have this at now:
<ListBox ItemsSource="{Binding Items}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
But I need something like this
Unfortunately, when I add the button programmatically
ListBox.Items.Add(button);
It throws an error -
Operation is not valid while ItemsSource is in use