随笔分类 -  WPF

摘要:Usually, in a MVVM application, you would have a view model for one list item, for instance, one item in the DataGrid. When the user clicks ‘Edit’ and the editable view is shown as modal dialog, you may want to use the same view model. However, if it is the same instance, how would you support cancelling the save operation? Because the entity in memory has been changed. 阅读全文
posted @ 2013-01-23 11:06 CatLight 阅读(294) 评论(0) 推荐(0)
摘要:在使用WPF进行应用程序的开发时,经常会为DataGrid生成行号,这里主要介绍一下生成行号的方法。通常有三种方法,这里主要介绍其中的两种,另一种简单提一下。 1. 常见的CodeBehind中用事件实现。 2. MVVM模式下的实现。 阅读全文
posted @ 2012-02-29 13:27 CatLight 阅读(20137) 评论(3) 推荐(5)
摘要:Just some WPF tips. 阅读全文
posted @ 2012-01-14 21:43 CatLight 阅读(980) 评论(0) 推荐(0)