WPF模拟Office2010文件菜单的TabControl模板

原文转载:http://my.oschina.net/linuxred/blog/93828

近日项目使用TabControl ,希望好看一下,从网上搜到上面那篇博客,仿Office样式,很好看,但原博主代码放的比较抽象,调试了半天,在自己机器上调通之后,Share一份给大家~~~~~~


<Window x:Class="XXX.Dialog.PublishDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="380" Width="600" Icon="/DMS;component/Resources/logo.png" ResizeMode="NoResize" Title="发布项目" Background="White">

    <Window.Resources>
        <ControlTemplate x:Key="OfficeTabControl" TargetType="{x:Type TabControl}">
            <Grid>
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup Name="SelectionStates">
                        <VisualState Name="Selected">
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="buttonBackgroundShape" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
                            </Storyboard>
                        </VisualState>
                        <VisualState Name="Unselected">
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="buttonBackgroundShape" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
         
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值