How to make the StackPanel or DockPanel stretch to fit their containers in WPF?

前端 未结 1 1442
半阙折子戏
半阙折子戏 2021-02-13 02:59

I have a Grid as a root container with two columns defined (There\'s only one row).
The first column has flexible width and second column has 300px fixed width.

1条回答
  •  长发绾君心
    2021-02-13 03:42

    You can make the Content of every ListBoxItem stretch by setting HorizontalContentAlignment in the ItemContainerStyle

    
        
            
        
    

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