全局 Style
1.定义一个全局资源文件,如下
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxn="http://schemas.devexpress.com/winfx/2008/xaml/navbar"
xmlns:local="clr-namespace:Haitai.Wpf">
<DataTemplate x:Key="MaskTemplate">
<Grid>
<ContentControl Content="{Binding}"></ContentControl>
<Grid Background="#3F000000">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<local:LoadingAdorner></local:LoadingAdorner>
</StackPanel>
</Grid>
</Grid>
</DataTemplate>
<Style TargetType="dxb:BarManager">
<Setter Property="MDIMergeStyle" Value="Default"></Setter>
<Setter Property="AllowCustomization" Value="False"></Setter>
<Setter Property="AllowQuickCustomization" Value="False"></Setter>
<Setter Property="AllowHotCustomization" Value="False"></Setter>
</Style>
<Style TargetType="dxb:Bar">
<Setter Property="ShowDragWidget" Value="False"></Setter>
<Setter Property="AllowCustomizationMenu" Value="False"></Setter>
<Setter Property="AllowQuickCustomization" Value="False"></Setter>
<Setter Property="AllowHide" Value="False"></Setter>
</Style>
<Style TargetType="dxb:BarButtonItem">
<Setter Property="BarItemDisplayMode" Value="Default"></Setter>
</Style>
<Style x:Key="ShortButtonStyle" TargetType="Button">
<Setter Property="Width" Value="60"></Setter>
<Setter Property="Margin" Value="0,0,4,0"></Setter>
</Style>
<Style x:Key="ButtonPanelStyle" TargetType="WrapPanel">
<Setter Property="Margin" Value="0,4,8,12"></Setter>
<Setter Property="HorizontalAlignment" Value="Right"></Setter>
</Style>
<Style x:Key="WindowStyle" TargetType="Window">
<Setter Property="dx:ThemeManager.ThemeName" Value="None"></Setter>
</Style>
<Style x:Key="DialogStyle" TargetType="Window" BasedOn="{StaticResource ResourceKey=WindowStyle}">
<Setter Property="ResizeMode" Value="NoResize"></Setter>
<Setter Property="SizeToContent" Value="Height"></Setter>
</Style>
<Style x:Key="ReadOnlyListViewStyle" TargetType="dxg:TreeListView">
<Setter Property="ShowRootIndent" Value="False"></Setter>
<Setter Property="MultiSelectMode" Value="Row"></Setter>
<Setter Property="AllowEditing" Value="False"></Setter>
<Setter Property="NavigationStyle" Value="Row"></Setter>
</Style>
</ResourceDictionary>
2.使用
1)引入命名空间:

2)控件上使用

全局 Style的更多相关文章
- Qt控件样式 Style Sheet Demo
迟来的笔记,作为一个程序员每日记事已养成习惯,离开许久,不知不觉已喜欢用文字表达对技术的热爱,学无止境! Qt – 一个跨平台应用程序和UI开发框架:它包括跨平台类库.集成开发工具和跨平台 IDE,使 ...
- vue入门全局配置
全局配置 Vue.config 是一个对象,包含 Vue 的全局配置.可以在启动应用之前修改下列属性: silent 类型:boolean 默认值:false 用法: Vue.config.silen ...
- WPF中Style文件的引用——使用xaml代码或者C#代码动态加载
原文:WPF中Style文件的引用--使用xaml代码或者C#代码动态加载 WPF中控件拥有很多依赖属性(Dependency Property),我们可以通过编写自定义Style文件来控制控件的外观 ...
- nextjs —— jsx style 学习记录
作用域 全局 <style global jsx>{` .hero { width: 100%; color: #333; } .title { margin: 0; width: 100 ...
- js入门学习~ 运动应用小例
要实现的效果如下: 鼠标移入各个小方块,实现对应的效果(变宽,变高,移入透明,移出恢复)~~ (且各运动相互之前不干扰) 主要是练习多个物体的运动框架~~ --------------------- ...
- angular2项目如何使用sass
angular/cli支持使用sass 新建工程: 如果是新建一个angular工程采用sass: ng new My_New_Project --style=sass 这样所有样式的地方都将采用sa ...
- 详解微信小程序开发(项目从零开始)
一.序 微信小程序,估计大家都不陌生,现在应用场景特别多.今天就系统的介绍一下小程序开发.注意,这里只从项目代码上做解析,不涉及小程序如何申请.打包.发布的东西.(这些跟着微信官方文档的流程走就好). ...
- Angular2 使用CLI创建新项目
1.安装node.js: 2. npm install -g @angular/cli 3.ng new projectName 4.ng serve PS:如果要使用moduleId,需先在src目 ...
- 学习Vue 入门到实战——学习笔记
闲聊: 自从进了现在的公司,小颖就再没怎么接触vue了,最近不太忙,所以想再学习下vue,就看了看vue相关视频,顺便做个笔记嘻嘻. 视频地址:Vue 入门到实战1.Vue 入门到实战2 学习内容: ...
随机推荐
- 1014 Waiting in Line (30)(30 point(s))
problem Suppose a bank has N windows open for service. There is a yellow line in front of the window ...
- es6新增功能
声明命令 1. let命令 ES6新增了let命令,用来声明变量.它的用法类似于var,但是所声明的变量,只在let命令所在的代码块内有效.下面代码在代码块之中,分别用let和var声明了两个变量.然 ...
- Tomcat CVE-2017-12615 远程上传漏洞复现
漏洞名称:CVE-2017-12615-远程代码执行漏洞 CVE-2017-12615:远程代码执行漏洞 当 Tomcat运行在Windows操作系统时,且启用了HTTP PUT请求方法(例如,将 r ...
- C++11中的raw string literals
作为一名C++书看得少得可怜的新手,我一直没有勇气去系统地学习一下C++ 11添加的新特性.不过,平日里逛论坛,阅读大犇们的博客,倒是了解了一些.比如,这个帖子: 如何绕过g++ 4.8.1那个不能在 ...
- hdu 2732 最大流 **
题意:题目是说一个n*m的迷宫中,有每个格子有柱子.柱子高度为0~3,高度为0的柱子是不能站的(高度为0就是没有柱子)在一些有柱子的格子上有一些蜥蜴,一次最多跳距离d,相邻格子的距离是1,只要跳出迷宫 ...
- 编写简单登陆和注册功能的demo时遇到的问题
一.注册功能中添加数据不成功 给数据库添加EditText中的内容后,数据库中找不到添加后的数据,并且存在字符串为空的数据 解决方法:EditText registerAccount = (EditT ...
- The sigrok project
http://www.sigrok.org/wiki/Main_Page The sigrok project aims at creating a portable, cross-platform, ...
- 各种SSD SMART 信息 转
intel SSD Toolbox SMART信息 解释:03 – Spin Up Time (磁头加载时间)The average time it takes the spindle to spin ...
- VS2010下配置Winpcap 开发环境
http://blog.csdn.net/taotaoyouarebaby/article/details/27326829
- js比较两个String字符串找出不同,并将不同处高亮显示
根据java代码改写成js,下边js文件代码: function StringBuffer() { this.__strings__ = []; }; StringBuffer.prototype.a ...