WPF界面设计—撸大师

 

WPF界面设计,模仿了金山卫士,360,鲁大师的界面!

 

    <!--无边框窗体-->
    <Style x:Key="NoResize_window" TargetType="{x:Type Window}">  
    <Setter Property="AllowsTransparency" Value="true"/>  
    <Setter Property="Background" Value="Transparent"/>  
    <Setter Property="FontFamily" Value="Consolas, Microsoft YaHei"/>  
    <Setter Property="FontSize" Value="24"/>  
    <Setter Property="ResizeMode" Value="NoResize"/>  
    <Setter Property="WindowStyle" Value="None"/>  
    <Setter Property="Template">  
        <Setter.Value>  
            <ControlTemplate TargetType="{x:Type Window}">  
                <Grid Margin="10">  
                    <Rectangle Fill="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"  
                        RadiusX="3" RadiusY="3">  
                        <Rectangle.Effect>  
                            <DropShadowEffect BlurRadius="10" ShadowDepth="0" Color="#FF898989"/>  
                        </Rectangle.Effect>  
                    </Rectangle>  
                    <Border Background="{TemplateBinding Background}"  
                        BorderBrush="{TemplateBinding BorderBrush}"  
                        BorderThickness="{TemplateBinding BorderThickness}"  
                        Padding="{TemplateBinding Margin}"  
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"  
                        CornerRadius="3">  
                        <ContentPresenter />  
                    </Border>  
                </Grid>  
            </ControlTemplate>  
        </Setter.Value>  
    </Setter>  
</Style>  
View Code

 

 

 

    <!--TabControl样式资源-->
    <Style x:Key="TabControlStyle" TargetType="{x:Type TabControl}">
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Padding" Value="4,4,4,4"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="#8C8E94"/>
        <Setter Property="Background" Value="#F9F9F9"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
                        <Grid.RowDefinitions>
                            <RowDefinition x:Name="RowDefinition0" Height="Auto" MinHeight="102.5"/>
                            <RowDefinition x:Name="RowDefinition1"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="ContentPanel" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
                            <ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                        <Canvas x:Name="HeaderPanel" HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch" Width="Auto" IsItemsHost="True"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
View Code

 

 

下载链接

 

转载:http://blog.csdn.net/cmis7645/article/details/7562833

 

转载于:https://www.cnblogs.com/tianciliangen/p/7028486.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值