ReSharper warnings with MVVM
You can use External Annotations to indicate to ReSharper the method is used and thus not to warn you. See the ReSharper docs on that here.
You need to decorate any such methods with [UsedImplicitlyAttribute]
.
Before using the attribute, you see:
and then, after applying the attribute:
[UsedImplicitly(ImplicitUseTargetFlags.WithMembers)]
class NotUsed
{
public int Field1 { get; set; }
public int Field2 { get; set; }
}
Use
<UserControl
...
xmlns:vm="clr-namespace:YourProject.ViewModels" mc:Ignorable="d"
d:DataContext="{d:DesignInstance vm:SomeClassViewModel}">
It 'stick's View to Model. In View you could see model properties and vice versa - in model properties should be used.