且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

对齐WPF的tabcontrol条

更新时间:2023-12-06 17:32:28

TabItem的的标头是位于在类型的面板的TabPanel 。我们可以在的TabControl

The Headers for the TabItem's are located in a panel of type TabPanel. We can add HorizontalAlignment="Right" for it in the Resources of TabControl

<TabControl ...>
    <TabControl.Resources>
        <Style TargetType="TabPanel">
            <Setter Property="HorizontalAlignment" Value="Right"/>
        </Style>
    </TabControl.Resources>
    <!--...-->
</TabControl>