全局 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 学习内容: ...
随机推荐
- UVALive 5968
假如出现SS 那么表示Spring,如果出现SX的话,就表示WINTER,末尾出现S不管 #include <map> #include <set> #include < ...
- SPOJ 10232. Distinct Primes
Arithmancy is Draco Malfoy's favorite subject, but what spoils it for him is that Hermione Granger i ...
- 基于Landmark的人脸对齐以及裁剪方法
利用Landmarks进行人脸对齐裁剪是人脸检测中重要的一个步骤.效果如下图所示: 基本思路为: a.人脸检测 人脸的检测不必多说了,基本Cascade的方式已经很不错了,或者用基于HOG/FHOG的 ...
- Go语言Web框架gwk介绍 (一)
今天看到Golang排名到前30名了,看来关注的人越来越多了,接下来几天详细介绍Golang一个web开发框架GWK. 现在博客园支持markdown格式发布文章么?后台的编辑器不太好用嘛. GWK ...
- Git_解决冲突
人生不如意之事十之八九,合并分支往往也不是一帆风顺的. 准备新的feature1分支,继续我们的新分支开发: $ git checkout -b feature1 Switched to a new ...
- TSC条码打印机C#例程(tsclib.dll调用)
TSC条码打印机C#例程(tsclib.dll调用) //---- program.cs using System;using System.Collections.Generic;using Sy ...
- Qt移动应用开发(三):使用精灵图片实现帧动画
Qt移动应用开发(三):使用精灵图片实现帧动画 上一篇博文讲到了Qt Quick对于动画的一般支持.动画的形式多样,配合不同的插值函数,能够差点儿实现全部想要的动画效果,而对于游戏的一些特殊的效果比方 ...
- 23LINQ运算符返回其它类型实例汇总
IEnumerable<T>返回其它集合类型 ToArray() ToList() ToDictionary() ToLookUp() 返回集合中的元素 □ ElementAt ...
- nsstring 怎么包含”(引号)号
使用转义字符 \ 即可.如下: [NSString *string = @"\"好\""]; NSLog("%@",string); 打印结 ...
- [翻译] ObjectAL for iPhone and Mac(持续更新)
ObjectAL for iPhone and Mac https://github.com/kstenerud/ObjectAL-for-iPhone 以后补上使用教程 Mac and iOS Au ...