惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
量子位
T
Tailwind CSS Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LangChain Blog
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
T
Troy Hunt's Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
T
Tor Project blog
T
The Blog of Author Tim Ferriss
I
Intezer
P
Privacy & Cybersecurity Law Blog
美团技术团队
N
Netflix TechBlog - Medium
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI

博客园 - Alen在西安

(转)关于教育些微的几个想法 寻找完美的 URL 验证正则表达式 【转发】 解决VS2012 Find and Replace (Ctrl+Shift+F) 不能正常工作的问题 会让你人生失败的31种原因(图 DTE(vs2012) 编程相关笔记 免费用电信的wifi 简单反编译 chm 文件 如何减少silverlight XAP包的尺寸 读书笔记 - .net2.0 异步编程模型: 使用 IAsyncResult 调用异步方法 测试绑定新浪微博 (转)Debug Silverlight in FireFox [转]CLR 全面透彻解析 - 将 APTCA 程序集迁移到 .NET Framework 4 在VS2010 "Choose Toolbox Item" Dialog 中显示自定义控件 笑话一则 Assembly 的 Shadow-Copy 所在的folder Silverlight 控件开发记录之 "extern alias” 关键字 安装完vS2010Beta2后请重置IDE设置 设置保护眼睛的背景色 又到五一了
VS2012 DesignTime 笔记
Alen在西安 · 2012-09-11 · via 博客园 - Alen在西安

在 VS2012 DesignTime中,对于通过PropertyValueEditor弹出的Dialog,是不会引用IDE的Theme Setting。

在我们做自定义Dialog时,如何做到同样的效果呢,有两种办法:

1. 使用 DialogPropertyValueEditor + DialogTemplate,这样弹出的Dialog就不会使用IDE的Theme

2. 自定义Dialog,该Dialog.DialogContent 是个Border,并且这个Border.Style应用 “DialogRootContainer” resource,DialogRootContainer定义在 Microsoft.Expression.DesignSurface + userinterface/propertyinspector/propertyinspectorresources.baml 里面,xaml sample 如下

<d:Dialog x:Class="CustomControlLibrary.Design.MyDialog"
        xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x
="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d
="clr-namespace:Microsoft.Expression.Utility.Controls;assembly=Microsoft.Expression.Utility"
        Title
="MyDialog" Height="300" Width="300">
    <Border FrameworkElement.Style="{DynamicResource DialogRootContainer}" KeyboardNavigation.TabNavigation="Cycle">
           <StackPanel >
            <TextBox>ccc1231245</TextBox>
        </StackPanel>
    </Border>

</d:Dialog> 

这个人有几点注意:

1.  DialogRootContainer会打断全局Style,所以如果想对Dialog内部的UIElemnt应用Style,请定义在Border以内,不要定义在dialog层

2. 不要加针对于 Microsoft.Expression.DesignSurface + userinterface/propertyinspector/propertyinspectorresources.baml 的resource