Center text in XAML Column and ListViewItem

后端 未结 1 2019
时光说笑
时光说笑 2021-01-24 03:19

I want to be able to center the text in the column and the cell for one column. This is the XAML that I have so far. I cannot figure out how to do it for one item opposed to a

1条回答
  •  耶瑟儿~
    2021-01-24 03:38

    Set the HorizontalContentAlignment property of the ListViewItem container to Stretch and use a CellTemplate with a TextBlock for the cell you want to center:

    
        
            
        
        
            
                
                    
                        
                            Copied From:
                        
                    
    
                    
                    
                        
                            
                        
                        
                            Date/Time:
                        
                        
                            
                                
                            
                        
                    
                
            
        
    
    

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