WPF: Center TabItems in a TabControl

后端 未结 1 1543
有刺的猬
有刺的猬 2021-01-01 17:52

in my XAML code, I have a TabControl with multiple items. The problem I have is that I can not center the tabitems about the content area. The tabs are always starting on th

1条回答
  •  猫巷女王i
    2021-01-01 18:16

    Internally, the TabControl uses a TabPanel to layout the tabs. Using the default template, you just need to set the HorizontalAlignment of the TabPanel through a style:

    
        
            
        
    
        
        
        
        
    
    

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