对齐WPF的tabcontrol条 [英] align wpf tabcontrol strip

查看:253
本文介绍了对齐WPF的tabcontrol条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想对准右侧一个TabControl条

I'm trying to align a tabcontrol strip on the right.

只是要清楚 - 我要上顶(tabstripplacement)选项卡,但上对齐正确的。

Just to be clear - I want the tabs on the top (tabstripplacement), but aligned on the right.

推荐答案

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>

这篇关于对齐WPF的tabcontrol条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆