ControlTemplate 中 Bingding 附加属性时需要加入 Path
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource MaterialDesignGroupBox}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{Binding (TextElement.Foreground), RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type FrameworkElement}}}"/>
Property="materialDesignMahApps:ShadowAssist.ShadowDepth" Value="Depth0"/>
<Setter Property="materialDesignMahApps:ColorZoneAssist.Mode" Value="PrimaryMid"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupBox}"> <DockPanel Background="{TemplateBinding Background}">
<materialDesignMahApps:ColorZone Background="{StaticResource PrimaryHueMidBrush}" x:Name="PART_ColorZone" DockPanel.Dock="Top" Mode="{Binding Path=(materialDesignMahApps:ColorZoneAssist.Mode), RelativeSource={RelativeSource TemplatedParent}}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" materialDesignMahApps:ShadowAssist.ShadowEdges="{Binding Path=(materialDesignMahApps:ShadowAssist.ShadowEdges), RelativeSource={RelativeSource TemplatedParent}}" UseLayoutRounding="True"> <ContentControl HorizontalAlignment="Left" Foreground="White" VerticalAlignment="Center" FontSize="20" FontWeight="DemiBold" Margin="10 0 0 4" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentStringFormat="{TemplateBinding HeaderStringFormat}" Content="{TemplateBinding Header}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</materialDesignMahApps:ColorZone>
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</DockPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
ControlTemplate 中 Bingding 附加属性时需要加入 Path的更多相关文章
- 【原】实时渲染中常用的几种Rendering Path
[原]实时渲染中常用的几种Rendering Path 本文转载请注明出处 —— polobymulberry-博客园 本文为我的图形学大作业的论文部分,介绍了一些Rendering Path,比较简 ...
- 配置JDK时环境变量path和JAVA_HOME的作用
1.PATH环境变量.作用是指定命令搜索路径,在i命令行下面执行命令如javac编译java程序时,它会到PATH变量所指定的路径中查找看是否能找到相应的命令程序.需要把jdk安装目录下的bin目录增 ...
- C#/.NET 中启动进程时所使用的 UseShellExecute 设置为 true 和 false 分别代表什么意思?
原文:C#/.NET 中启动进程时所使用的 UseShellExecute 设置为 true 和 false 分别代表什么意思? 在 .NET 中创建进程时,可以传入 ProcessStartInfo ...
- 在php中定义常量时,const与define的区别?
问]在php中定义常量时,const与define的区别? [答]使用const使得代码简单易读,const本身就是一个语言结构,而define是一个函数.另外const在编译时要比define快很 ...
- AndRodi Strudio中的按钮时件
AndRodi Studio中的按钮时件注册一定要写在onCraete中 @Override protected void onCreate(Bundle savedInstanceState) { ...
- 在MySQL向表中插入中文时,出现:incorrect string value 错误
在MySQL向表中插入中文时,出现:incorrect string value 错误,是由于字符集不支持中文.解决办法是将字符集改为GBK,或UTF-8. 一.修改数据库的默认字符集 ...
- Android Tips: 在给drawable中添加图片资源时,文件名必须全小写
在给drawable中添加图片资源时,文件名必须全小写
- 在查询时将查询条件放入Session中,导出时直接根据qpniRGaFiler取查询条件即可
在查询时将查询条件放入Session中,导出时直接根据qpniRGaFiler取查询条件即可
- 使用ueditor中的setContent() 时经常报innerHtml错误(笔记)
1)今天遇到个问题,使用ueditor中的setContent() 时经常报innerHtml错误:网上找了下解决方案:发现这个可以用: 不能创建editor之后马上使用ueditor.setCont ...
随机推荐
- 老程序员解Bug的通用套路
千万不要当程序员面说有bug 对于新手程序员而言,在复杂代码中找BUG是一个难点.下面我们总结下老从程序员解Bug的通用套路,希望对大家有帮助. 1.IDE调试 根据项目特点和语言特点选择一个最合适的 ...
- [Swift实际操作]九、完整实例-(3)创建和安装开发证书、发布证书及开发证书配置文件、发布证书配置文件
本文将为你演示,如何创建开发证书和发布证书,以及其他辅助内容.首先打开浏览器,进入[苹果开发者网站]输入[Apple ID]和[密码],点击登录按钮,进入开发者管理后台. 点击左侧的[Membersh ...
- Java create azure web app
create a certificate <java-install-dir>/bin/ keytool -genkey -alias <keystore-id> -keyst ...
- Linux crontab定时任务命令使用记录
安装crontab 使用 crontab -v 如果提示没有该命令,则需要安装.安装也很简单,推荐使用yum安装.一条命令即可(yum install crontab),这里不多介绍. 下面是一些基础 ...
- 安装使用Redis过程中可能出现的错误收集
1.使用make test测试编译状态报错 cd src && make test make[1]: Entering directory `/usr/local/redis-3.2. ...
- 004 Android XML文件常用五大页面布局方式
1.线性布局(LinearLayout)最常用 <1>使用线性布局,首先在xml文件中修改布局为LinearLayout 修改完成后,可在Component Tree中看见如下内容: &l ...
- mfix的Negative gas density报错解决
错误很难定位,因为编译正常,而是运行过程中会告知出现Negative gas density,并且不收敛,没有其他错误信息.最后通过一步步定位发现是由于 IC_EP_g(1) < EP_star ...
- ssm框架中的乱码问题的解决
在搭建ssm框架过程中可能会出现乱码的问题,解决的最好方法就是不管在哪儿都设置为utf-8: 统一编码格式,所有的都设置为utf-8: 首先的就是将所有的请求设置为utf-8: 设置post请求的编码 ...
- java mybatis学习二
<select id="find1" parameterType="java.util.HashMap" resultType="com.xxx ...
- 【研究】CVE-2015-1635-HTTP.SYS远程执行代码漏洞(ms15-034)
1.1.1 漏洞描述 在2015年4月安全补丁日,微软发布的众多安全更新中,修复了HTTP.sys中一处允许远程执行代码漏洞,编号为:CVE-2015-1635(MS15-034 ).利用HTTP. ...