How to center text in a specific column in WPF ListView?

后端 未结 1 679
深忆病人
深忆病人 2020-12-20 11:41

I tried this and also HorizontalAlignment, instead of TextAlignment but they still show up aligned to left.



        
1条回答
  •  天涯浪人
    2020-12-20 11:53

    Try to set HorizontalContentAlignment to Stretch for the ItemContainerStyle. Then it should work with either TextAlignment="Center" or HorizontalAlignment="Center" for the TextBlock

    
        
            
        
        
    
    

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