How do I make a WPF data template fill the entire width of the listbox?

后端 未结 8 1351
别跟我提以往
别跟我提以往 2020-12-04 16:23

I have a ListBox DataTemplate in WPF. I want one item to be tight against the left side of the ListBox and another item to be tight ag

8条回答
  •  攒了一身酷
    2020-12-04 16:55

    Extending Taeke's answer, setting the ScrollViewer.HorizontalScrollBarVisibility="Hidden" for a ListBox allows the child control to take the parent's width and not have the scroll bar show up.

                    
        
    
    

提交回复
热议问题