I have in my wpf code a listbox with the name "lstBox" (left invisible), and inside it a listBoxItem with a label and a textbox. Outside the listbox, in the same window I have an "add item" button (clicking would make the listbox visible). I would like every click on this button to create a new listboxItem with the same face as I already created in the wpf code inside lstBox and it is only invisible. Can anyone help me?
<Grid>
<ListBox
Name="lstBox"
Margin="0,191,51,46">
<ListBoxItem
Name="lstboxitem"
HorizontalAlignment="Left"
Height="78"
VerticalAlignment="Top"
Width="167"
Background="#FFE8B0B0"/>
</ListBox>
<Button Margin="664,206,76,396" Click="Button_Click_1"
/>
</Grid>