WPF ListBox that lays out its items horizontally

后端 未结 2 1301
栀梦
栀梦 2021-01-31 13:45

I\'m trying to write a WPF application for displaying images from a selection. I want to display all of the available images in a banner along the top of the window, and display

2条回答
  •  旧巷少年郎
    2021-01-31 14:40

    The default ItemsPanel for the ListBox control is a VirtualizingStackPanel, so if you want the normal, default experience for the control but just have it laid out horizontally, you should specify this (and change the orientation).

    Example:

    
        
            
                
            
        
    
    

提交回复
热议问题