家园

Design Patterns and refactor

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  79 随笔 :: 7 文章 :: 59 评论 :: 3 引用

公告

2012年4月25日 #

摘要: What is the difference between Finalize() and Dispose()?Dispose() is called by as an indication for an object to release any unmanaged resources it has held.Finalize() is used for the same purpose as dispose however finalize doesn’t assure the garbage collection of an object.Dispose() operates deter阅读全文
posted @ 2012-04-25 21:25 umlchina 阅读(136) 评论(0) 编辑

2012年4月24日 #

摘要: A little while back, we did a tutorial on how to embed WinFoms controls inside of WPF application (you can read all about ithere). Today, we are going to flip that on its head - we are going to take a look at how to embed WPF controls inside of a WinForms application.You might be thinking to yoursel阅读全文
posted @ 2012-04-24 21:19 umlchina 阅读(413) 评论(0) 编辑

2011年11月21日 #

摘要: 一个基于prism框架desktop项目,总共有100多个module。程序启动的时候有几秒钟的delay。用的DirectoryModuleCatalog类从本地目录中装载module的程序集。附:DirectoryModuleCatalog装载部分源代码View Code //===================================================================================//Microsoftpatterns&practices//CompositeApplicationGuidanceforWindowsPre阅读全文
posted @ 2011-11-21 14:55 umlchina 阅读(514) 评论(1) 编辑

摘要: The main WPF thread will always be assigned a default setting for CurrentCulture and CurrentUICulture. You can also explicitly set these values based on user preferences (to be discussed). An important point to note, however, is that if a WPF application spins up new threads, those threads will not 阅读全文
posted @ 2011-11-21 14:11 umlchina 阅读(56) 评论(0) 编辑

2011年11月19日 #

摘要: Dino Esposito 在上个月的专栏中,我简要介绍了 Unity 2.0 依赖关系注入容器使用的拦截机制。 在演示面向方面的编程 (AOP) 的核心概念之后,我介绍了一个具体的拦截示例,可能符合如今的很多开发人员的需要。 您是否想要扩展现有代码的行为却不想以任何方式触及源代码? 您是否希望围绕现有的代码再运行更多代码? AOP 的目标是提供一种方法,将核心代码与其他干扰核心业务逻辑的内容隔离开。 Unity 2.0 提供基于 Microsoft .NET Framework 4 的框架来实现此目的,而且极其快速和方便。 为了使您完全理解这篇后续文章的目的,我先概要介绍上个月的内容。 您.阅读全文
posted @ 2011-11-19 13:35 umlchina 阅读(332) 评论(1) 编辑

摘要: Interception and Interceptors in C# (Aspect oriented programming)by Ioannis 16. January 2011 10:38 In this post, we see how to define specific actions to be executed before or after the execution of every call to a method in our code. This is also known as “intercepting” the execution of a method an阅读全文
posted @ 2011-11-19 12:27 umlchina 阅读(309) 评论(2) 编辑

2010年8月27日 #

摘要: WPF is powerful. So powerful in fact, that sometimes it's hard to find styles and settings to make it do what you want. Aligning ListView items was one such example for me. This snippet tutorial will ...阅读全文
posted @ 2010-08-27 10:01 umlchina 阅读(244) 评论(0) 编辑

2010年8月26日 #

摘要: DataTemplates are an extremely powerful part of WPF, and by using them, you can abstract all sorts of display code. However, there are times when they fall short - and initially when I was learning WP...阅读全文
posted @ 2010-08-26 18:30 umlchina 阅读(665) 评论(1) 编辑

摘要: Dependency Properties Introduction Value resolution strategy The magic behind it How to create a DepdencyProperty Readonly DependencyProperties Attached DependencyProperties Listen to dependency prope...阅读全文
posted @ 2010-08-26 17:03 umlchina 阅读(307) 评论(0) 编辑

摘要: http://www.switchonthecode.com/tutorials/wpf-tutorial-introduction-to-dependency-propertiesSo I was going to dive right in and do a part 2 on the WPF ListView tutorial from last week, but as I was wri...阅读全文
posted @ 2010-08-26 16:29 umlchina 阅读(260) 评论(0) 编辑