Present ListBox Items Bottom-to-Top

后端 未结 1 1871
无人共我
无人共我 2020-12-31 11:33

I\'ve searched for quite a while trying to find an answer to this without any results.

The default WPF Listbox adds items aligned at the top, and additional items be

相关标签:
1条回答
  • 2020-12-31 12:12

    Change the ItemsPanel's layout:

    <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <VirtualizingStackPanel VerticalAlignment="Bottom"/>
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
    

    This does what your image seems to imply, with the first item added still on top. If you want to reverse the order as well that would be a different issue.

    0 讨论(0)
提交回复
热议问题