As I implement the MVVM pattern with WPF, I'm finding that Resharper is often warning me that certain properties are never used in my ViewModels. The problem is that they are being used, but only by the data binding system. Has anyone else encountered this annoyance and is there a way to help Resharper realize that these properties are, indeed, being used? I am glad, at least, that VS 2010 properly realizes that [Import] tagged members won't "always be null", but hopefully I can fix this issue as well.
A crude workaround would be to disable the warning altogether:
Under Resharper > Options > Code Inspection > Inspection Severity, set the warning level for this item to "Do not show".
This is obviously not ideal, but it depends on your level of annoyance with the false positives.
You can try two different options. One is to reduce the severity of the Resharper inspection to "Hint". The other option is to use the "Suppress inspection with comment" item Resharper provides for the properties that generate the warning that you know are being used. Personally, I'd go with reducing the severity to "Hint".
Are the properties public or internal? In my experience, ReSharper doesn't warn on pubic (since there's no way it could tell that the members aren't being used externally) but it will warn on internal members since they can only be used within that assembly (InternalsVisibleTo notwithstanding)