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

推荐订阅源

V
Visual Studio Blog
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 【当耐特】
小众软件
小众软件
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
Engineering at Meta
Engineering at Meta
人人都是产品经理
人人都是产品经理
Microsoft Security Blog
Microsoft Security Blog
Last Week in AI
Last Week in AI
H
Help Net Security
爱范儿
爱范儿
云风的 BLOG
云风的 BLOG
博客园 - 司徒正美
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Microsoft Azure Blog
Microsoft Azure Blog
L
LangChain Blog
WordPress大学
WordPress大学
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
腾讯CDC

博客园 - 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