【.Net码农】WPF界面设计—撸大师
2015-03-31 22:19
260 查看
/article/8440741.html
![](http://my.csdn.net/uploads/201205/13/1336912738_3915.jpg)
WPF界面设计,模仿了金山卫士,360,鲁大师的界面!
[html] view
plaincopy
<!--无边框窗体-->
<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>
![](http://my.csdn.net/uploads/201205/13/1336918091_7419.jpg)
[html] view
plaincopy
<!--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>
![](http://my.csdn.net/uploads/201205/13/1336912738_3915.jpg)
WPF界面设计,模仿了金山卫士,360,鲁大师的界面!
[html] view
plaincopy
<!--无边框窗体-->
<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>
![](http://my.csdn.net/uploads/201205/13/1336918091_7419.jpg)
[html] view
plaincopy
<!--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>
相关文章推荐
- 【.Net码农】WPF界面—仿360安全卫士9.0界面
- [.Net码农]分享非常漂亮的WPF界面框架源码及插件化实现原理
- WPF界面设计—撸大师
- WPF界面设计—撸大师
- WPF换肤之四:界面设计和代码设计分离
- WPF界面设计的方式
- WPF界面设计技巧(9)—使用UI自动化布局
- WPF界面设计技巧(10)-样式的继承
- WPF界面设计技巧(5)—自定义列表项呈现内容
- WPF界面设计技巧 系列
- 从架构设计到系统实施-基于.NET 3.0的全新企业应用之设计基于WPF的客户端
- WPF界面设计技巧—实现不规则动画按钮
- WPF下的视频录制界面设计
- .NET 应用程序界面开发经验总结 设计良好的程序的表现之一就是细节做的还可以
- WPF下的视频录制界面设计
- WPF界面设计的方法
- WPF界面设计技巧(4)—自定义列表项样式
- WPF界面设计技巧(3)—实现不规则动画按钮
- [导入]从架构设计到系统实施——基于.NET 3.0的全新企业应用系列课程(5):设计基于WPF的客户端.zip(6.98 MB)
- WPF界面设计技巧(1)—不规则窗体图文指南