摘要:
Model-View-ViewModel是一种架构模式,主要在WPF、Silverlight和WP7开发里使用,它的目标是从视图层移除几乎所有代码隐藏(code-behind)。交互设计师可以专注于使用XAML表达用户体验需求,然后创建和视图模型的绑定,而视图模型则是由应用程序开发者开发和维护的。MVVM是更加通用的Presentation模式的一个具体实现。MVVM视图模型包含概念模型而不是数据模型,所有业务逻辑和其它操作都是在模型和视图模型里完成的。有很多框架可以做到这点,其中一些是:开源的PRISM:由微软提供,和MEF/Unity一起用于依赖注入,支持组合命令,可以扩展。MSDN上有详 阅读全文
随笔档案-2013年06月
C#中改变显示器的分辨率
2013-06-07 17:34 by 观海看云, 703 阅读, 收藏, 编辑
摘要:
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Runtime.InteropServices;namespace ScreenResolution{ public class Form1 : System.Windows.Forms.Form { public enum DMDO { DEFAULT = 0, D90 ... 阅读全文
kindeditor4.x 代码高亮
2013-06-07 14:48 by 观海看云, 459 阅读, 收藏, 编辑
摘要:
kindeditor4.x 代码高亮http://www.wpf8.net/news/net/201306/366.htmlhttp://blog.sina.com.cn/s/blog_788e5b7a0101cd2b.html 阅读全文
利用XMLHTTP下载文件
2013-06-07 14:44 by 观海看云, 1828 阅读, 收藏, 编辑
摘要:
using MSXML2; 下面就是主要的代码:private void Page_Load(object sender, System.EventArgs e){ string Url = "http://dotnet.aspx.cc/Images/logoSite.gif"; string StringFileName = Url.Substring(Url.LastIndexOf("/") + 1); string StringFilePath = Request.PhysicalApplicationPath; if(!StringFilePat 阅读全文