In Visual Studio 2010, why does “Calculate Code Metrics” ignore .xaml.cs files? Is there a way to include these sources in the calculation?
For example, the selected project below has many lines of code, all in .xaml.cs files:

Update:
I follow what the two answers show from KodeKreachor and aKzenT, but I still get no lines of code. What am I doing wrong?


There is an option switch in the settings that disables code metrics for generated files. Try to turn that off.
Source: http://codemetricsviewer.wordpress.com/2011/06/26/how-to-get-results-for-code-behind-xaml-files/
Edit: It requires an extension to visual studio though, which you can get on the linked source. With this extension you get a new tool window where you can start an analysis. See also:
http://codemetricsviewer.wordpress.com/2011/06/26/where-can-i-find-the-code-metrics-viewer-in-visual-studio/