Last active
August 29, 2015 13:57
-
-
Save ChaseFlorell/9648056 to your computer and use it in GitHub Desktop.
Place this file beside the `Cirrious.MvvmCross.dll` file in each of the `lib` directories. Doing so will enable you to [alt] + [enter] (resharper) on an AutoProperty, and get the additional option "To property with change notification".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<assembly name="Cirrious.MvvmCross"> | |
<member name="M:Cirrious.MvvmCross.ViewModels.MvxNotifyPropertyChanged.RaisePropertyChanged``1(System.Linq.Expressions.Expression{System.Func{``0}})"> | |
<attribute ctor="M:JetBrains.Annotations.NotifyPropertyChangedInvocatorAttribute.#ctor" /> | |
</member> | |
</assembly> | |
<!-- https://github.com/MvvmCross/MvvmCross/blob/v3.1/Cirrious/Cirrious.MvvmCross/ViewModels/MvxNotifyPropertyChanged.cs#L40 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Foo : MvxViewModel | |
{ | |
// before | |
public string Bar { get; set; } | |
// after [alt] + [enter] | |
private string _bar; | |
public string Bar | |
{ | |
get { return _bar; } | |
set | |
{ | |
if (value == _bar) return; | |
_bar = value; | |
RaisePropertyChanged(() => Bar); | |
} | |
} | |
} |
Took me a second to realize but I got it! There's a small issue with the xml - there should be 2 backticks (``), not just one!
Here's the "fixed" version:
<?xml version="1.0" encoding="utf-8"?>
<assembly name="Cirrious.MvvmCross">
<member name="M:Cirrious.MvvmCross.ViewModels.MvxNotifyPropertyChanged.RaisePropertyChanged``1(System.Linq.Expressions.Expression{System.Func{``0}})">
<attribute ctor="M:JetBrains.Annotations.NotifyPropertyChangedInvocatorAttribute.#ctor" />
</member>
</assembly>
<!-- https://github.com/MvvmCross/MvvmCross/blob/v3.1/Cirrious/Cirrious.MvvmCross/ViewModels/MvxNotifyPropertyChanged.cs#L40 -->
Working now - Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So in that Nuget package directory I have the following two items.
The contents of the XML is what's posted above.
I re-launch Visual Studio, create a property
then I alt + enter
but unfortunately the option still doesn't exist.