Posts Tagged ‘WPF’

WPF, MVVM, INotifyPropertyChanged: Lambda – DependencyObject performance

March 18, 2012

INotifyPropertyChanged give a helpfull “feature” to WPF+MVVM, but using all those variable names via string is painfull (ie refactoring ?!?!) .
Well, Lambda expression are an easy solution, cute and let writes fluent reading code.
All that glitters ain’t gold!

Lamdba facilitations come with a heavy resource usage: time, cpu, memory.

Here is a blog post, MVVM – Lambda vs INotifyPropertyChanged vs DependencyObject, with some tests and comparison.

Better have a look. 😉
source: MVVM – Lambda vs INotifyPropertyChanged vs DependencyObject

Technorati tags: WPF, MVVM, INotifyPropertyChanged, Lambda

CSLA & WPF MVVM: ValidationRules in ViewModel

October 9, 2011

CSLA framework provide validation rules mechanism via Business Rules.

How we can bring csla validation rules in MVVM viewmodel ?
Just implement IDataErrorInfo in viewmodel, and link to broken rule collection. 🙂

Thanks to EnricoG for his wonderfull solution.

here is a sample: Using a ViewModel to Provide Meaningful Validation Error Messages

Technorati tags: WPF, MVVM, CSLA, Validation, IDataErrorInfo

VSTO office ribbon [bookmark]

July 27, 2011

Working with VSTO office ribbon, might be sometimes hard.
The more info you have, the simpler it will be.

Here is a free chapter from book Excel 2007 VBA Programmer’s Reference

Read free chaper 14 here: Ribbon X, ch 14.

Xedotnet meeting: Test Driving a MVVM Application + .Net Micro FW sessions

June 11, 2011

Yesterday was last Xedotnet meeting of 2011 season-part 1.

Test Driving a MVVM Application
Speaker: Emanuele DelBono

A short, brief and complete intro on TDD & WPF.
A sort of step-by-step guide, hands on code, with pomodoro too! 😉

very very happy not missed it 🙂

#Session 2
Introduzione a .NET Micro Framework
Speaker: Mirco Vanini – Senior Consultant

We needed it!
Since 2009, a lot of changes have happened.
The project’s team moved to Visual Studio, micro framework’s code is on codeplex, porting kit is free … a lots of others.

Mirco reported every one of them, and helped us to figure out the current situation.

Both session, involving and very professional speakers.

Xedotnet: +2, once more 😉

Technorati tags: Xedotnet, WPF, MVVM, TDD, .NET Micro FW

WPF: Enter/Esc key as shortcuts of OK/Cancel buttons

May 29, 2011

DialogBox is the easiest example that comes, but 99% of windows should have shortcuts for “OK” and “CANCEL” button.
The keys supposed to be the shortcut keys are always the same: ENTER and ESC key.
In XAML, you can set up this shortcut in button properties, via IsDefault and IsCancel properties.

Here is an example:

<Button Name="btnOK" IsDefault="True">OK</Button>
<Button Name="btnCancel" IsCancel="True">CANCEL</Button>

source: Dialog Boxes Overview