Gaps between items in my ListBox

后端 未结 2 1805
北恋
北恋 2020-12-30 20:13

When I create ListBox with horizontal items ordering for example like this:


    
        

        
2条回答
  •  不知归路
    2020-12-30 20:35

    Those gaps are inside the ControlTemplate of the ListViewItems, you'd have to override that i'm afraid...

    Edit: On some platforms you do not even need to mess with the Template to get rid of the gaps between items:

        
            
        
    

    To get rid of the gap at the very side you actually need to change the ListBox ControlTemplate itself, it's not a matter of the items. In the default Aero template there is a border with Padding = 1

提交回复
热议问题