Add a space between the last item and the end of the list

I have a list box that will contain several hundred items. When the user adds a new item, he will be at the bottom of the list, and they will edit it.

Is there a way to add some space between the last item and the end of the list so that the user can scroll the last item up?

Just as you can do in the visual studio code editor, you can scroll down to the end of the text to a certain point and move the last line up.

thanks

+4
source share
1 answer

Set the ItemsPanel to StackPanel and add the bottom box to the StackPanel.

<ListBox> <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel Margin="0,0,0,50"/> </ItemsPanelTemplate> </ListBox.ItemsPanel> </ListBox> 
+5
source

All Articles