WPF Dev 16.2版本的DXTabControl的页签标题设置




前台设置:

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WPF123"
        xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" x:Class="WPF123.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <dx:DXTabControl Margin="18,23,37,47"  Name="hahahha">
            <dx:DXTabControl.View>
                <dx:TabControlMultiLineView HeaderLocation="Top"></dx:TabControlMultiLineView>
            </dx:DXTabControl.View>
            <dx:DXTabItem Header="123">
                <Grid Background="AliceBlue">
                    <Button Height="22" Content="123"></Button>
                </Grid>
            </dx:DXTabItem>
            <dx:DXTabItem Header="456">
                <Grid Background="AliceBlue">
                    <Button Height="22" Content="456"></Button>
                </Grid>
            </dx:DXTabItem>
            <dx:DXTabItem Header="789">
                <Grid Background="AliceBlue">
                    <Button Height="22" Content="789"></Button>
                </Grid>
            </dx:DXTabItem>
        </dx:DXTabControl>
    </Grid>
</Window>


dx:TabControlMultiLineView HeaderLocation="Top”,top向上显示,right 靠右显示,none不显示


后台代码设置:

.View.HeaderLocation = DevExpress.Xpf.Core.HeaderLocation.None;


注:

namespace DevExpress.Xpf.Core
{
    //
    // 摘要:
    //     Lists values that specify the location of the Header Panel, relative to the tab
    //     item.
    public enum HeaderLocation
    {
        //
        // 摘要:
        //     The Header Panel is not displayed.
        None = 0,
        //
        // 摘要:
        //     The Header Panel is located on the left side of the tab item.
        Left = 1,
        //
        // 摘要:
        //     The Header Panel is located at the top of the tab item.
        Top = 2,
        //
        // 摘要:
        //     The Header Panel is located on the right side of the tab item.
        Right = 3,
        //
        // 摘要:
        //     The Header Panel is located at the bottom of the tab item.
        Bottom = 4
    }
}



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值