WPF界面设计—撸大师

摘要:
WPF界面设计模仿金山卫士、360和鲁大师的界面!

WPF界面设计—撸大师第1张

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

WPF界面设计—撸大师第2张WPF界面设计—撸大师第3张
    <!--无边框窗体-->
    <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

WPF界面设计—撸大师第4张

WPF界面设计—撸大师第2张WPF界面设计—撸大师第6张
    <!--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

免责声明:文章转载自《WPF界面设计—撸大师》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Docker Swarm 服务版本更新与回滚javascript“数组”的常用方法---以及冒泡排序下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

贫民窟里的WPF系列讲座(一)

最近讲了一套完整的WPF课程,感觉教学效果还很不错。我准备给MSDN录15期左右的事情,这几篇文章是配合视频一起来看的。我相信大家都是很喜欢研究新技术的,但是研究新技术的时候会遇到很多困难,譬如书籍的选择,工具的选择,环境的配置等等很多很多问题。 这里我结合自己学习的历程,分享一下。这里我说一下我当时学习的硬件条件,由于我的笔记本是IBM的T40,CPU是...

WPF 数据验证

  在软件UI界面录入数据时候,为了保证数据的正确、有效、规范性,很多情况下都要验证数据的有效性。比如录入某个人的信息,那么我们就需要对这个人的姓名验证是否为空字符串,年龄是否为有效数字,性别是否为男或女等等。   在WPF开发中,数据的验证和数据绑定结合在一起,实现起来很优雅。我们可以让数据Model(模型)实现IDataErrorInfo接口来实现每个...

WPF通过深拷贝实现保存与取消

用old保存就设置,用new保存新设置确认逻辑 public void SaveCurrent() { //创建一个新对象(深拷贝) oldConfig = CopyEx.DeepCopyByBin(config); } 取消逻辑 public voi...

WPF 创建桌面快捷方式

#region 创建桌面快捷方式 string deskTop = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop); string dirPath = System.Environment.CurrentDirectory;...

继续聊WPF——用Blend自定义Listview控件的列表头

在Blend中右击ListView控件,从样式和模板相关的菜单项中,我们没找到与列表头有关的项。 然后,我们到属性面板中找GridView的ColumnHeaderContainerStyle属性,结果你发现,就算你在高级选项菜单中把它转换为本地资源,你会发现它没有反应,切换到XAML视图也没看到生成的代码。 那是不是没办法了呢?这个问题我想了想...

.NET 控件集 ComponentOne V2020.0 Update3 发布,正式支持 .NET 5

ComponentOne 是一套专注于企业 .NET开发、支持 .NET Core 平台,并完美集成于 Visual Studio 的第三方控件集,包含 300 多种 .NET开发控件,可满足 WinForm、WPF、 UWP、ASP.NET MVC等七个 .NET平台的系统开发需求,并提供表格数据管理、数据可视化、报表、输入和编辑等七大功能,被誉为“.NE...