首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2014年6月16日

摘要: 1 SELECT 2 DB_NAME(mf.database_id) AS databaseName, 3 name as File_LogicalName, 4 case 5 when type_desc = 'LOG' then 'Log File' 6 when type_desc = 'R... 阅读全文

posted @ 2014-06-16 11:58 Alex Geng 阅读(214) 评论(0) 推荐(0)

2014年3月10日

摘要: 1 public class TextBoxFilterBehavior : Behavior 2 { 3 public static readonly DependencyProperty LegalCharsProperty = DependencyProperty.RegisterAttached( 4 "LegalChars", typeof(string), typeof(TextBoxFilterBehavior), new PropertyMetadata("1234567890abcdefghijklmnopqrstuvwxyz")); 阅读全文

posted @ 2014-03-10 10:15 Alex Geng 阅读(522) 评论(0) 推荐(0)

2012年11月29日

摘要: 被各种exception折磨了一整天以后终于发现了问题所在C#, entity framework, auto increment problemhttp://stackoverflow.com/questions/3188194/c-entity-framework-auto-increment-problemCheck in your EDMX model, that the autoincrement field's StoreGeneratedPattern attribute is set to "Identity". In this way, EF kn 阅读全文

posted @ 2012-11-29 10:09 Alex Geng 阅读(239) 评论(0) 推荐(0)

2012年11月25日

摘要: IntroductionA very common and popular way to synchronize data between the model and the view in WPF is using DataBinding. The value of the model is transferred to the view once, when the binding is initialized. But for every subsequent change, the model must notify the binding to transfer the value 阅读全文

posted @ 2012-11-25 14:42 Alex Geng 阅读(164) 评论(0) 推荐(0)

摘要: If you want to listen to changes of a dependency property, you can subclass the type that defines the property and override the property metadata and pass an PropertyChangedCallback. But an much easier way is to get the DependencyPropertyDescriptor and hookup a callback by calling AddValueChanged()D 阅读全文

posted @ 2012-11-25 11:29 Alex Geng 阅读(137) 评论(0) 推荐(0)

摘要: If you are a child element of a user interface and you want to access data from a parent element, but you don't know how many levels up that elemens is, it's the best solution to navigate up the tree until it finds an element of the requested type.This helper does excactly this. You can use 阅读全文

posted @ 2012-11-25 10:59 Alex Geng 阅读(133) 评论(0) 推荐(0)