April 2009 - Posts

4
Comments

How to disable Copy and Paste for a control in WPF by marianor

By default all the TextBox ’s (an other controls) in WPF have a default ContextMenu that allows copy, paste and cut. You can disable this menu by setting this property as “{x:Null}”, but the keys associated with the menu options still work. In order to...
Filed under:
12
Comments

WPF Validation with Attributes and IDataErrorInfo interface in MVVM by marianor

WPF provides validation infrastructure for binding scenarios through IDataErrorInfo interface. Basically you have to implement the Item[columnName] property putting the validation logic for each property in your Model (or ModelView) requiring validation...
Filed under:
1
Comments

MOQ 3.1 released by marianor

Finally MOQ 3.1 was released, it includes a lot of fixes of the previous version (3.0). You can get the binaries here .
Filed under:
2
Comments

Using expression trees to get property getter and setters by marianor

There are times when you need get and set property values and you do not know the type of the properties. One option is use reflection through GetValue and SetValue from PropertyInfo class, but this wears to poor performance in our code. In order to do...
Filed under:
More Posts