摘要: In order to solve the problems happen in my application, I decided to dig into the AppDomain. I found some interesting information, so I write them down. Keys of AppDomainThe CLR scopes all objects, values, and object references to a particular AppDomain. An object resides in exactly one AppDomain, 阅读全文
posted @ 2011-03-02 15:35 yedafeng 阅读(730) 评论(0) 推荐(0) 编辑
摘要: Recently, I am curious about what WCF client really does when creating proxy object (ClientBase) or use the ChannelFactory directly.If service reference is added by using the Visual Studio directly, it will automatically create a service client for you, it implements the service contract and inherit 阅读全文
posted @ 2011-03-02 15:34 yedafeng 阅读(398) 评论(0) 推荐(0) 编辑
摘要: How to create a new DependencyProperty?Let’s start from creating a new DependencyProperty. This example is simple, a new UserControl is created, which is named TestCtrl. In this UserControl, I create a new DependencyProperty as the following codes.public partial class TestCtrl : UserControl{public s 阅读全文
posted @ 2011-03-02 15:30 yedafeng 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Set the value of DPIn the preceding sections, it shows you how to register and what .NET does for you. If we want to set the value of MyContent, we just need to dot this:this.TestCtrl1.MyContent = "Button Clicked!";According to the definition of this property, you can find that it invokes 阅读全文
posted @ 2011-03-02 15:28 yedafeng 阅读(207) 评论(0) 推荐(0) 编辑
摘要: How does this class serialize the contract? And why does it have performance issue? These questions make me mad these days, because my project suffers a lot from this class. I have to spend several hours to figure this thing out. Here is what it does.There is an internal class named DataContract use 阅读全文
posted @ 2011-03-02 15:24 yedafeng 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 在WPF中, 我们可以通过调用ChangeLogicalParent 来改变一个元素的logical parent, 但是这个过程是非常耗时的,以下是该函数的运行过程。 阅读全文
posted @ 2011-03-02 15:21 yedafeng 阅读(194) 评论(1) 推荐(0) 编辑