We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Before:
public class ViewModel : INotifyPropertyChanged { private readonly Dictionary<string, string> map = new Dictionary<string, string>{ { "1", "one" } }; public event PropertyChangedEventHandler PropertyChanged; public string this[string index] { get => this.map[index]; set { this.map[index] = value; this.OnPropertyChanged(); } } protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } }
After:
public class ViewModel : INotifyPropertyChanged { private readonly Dictionary<string, string> map = new Dictionary<string, string>{ { "1", "one" } }; public event PropertyChangedEventHandler PropertyChanged; public string this[string index] { get => this.map[index]; set { this.map[index] = value; this.OnPropertyChanged("Item[]"); } } protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } }
When using [CallerMemberName] Itemis passed as name and it does not work with bindings.
[CallerMemberName]
Item
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Before:
After:
When using
[CallerMemberName]
Item
is passed as name and it does not work with bindings.The text was updated successfully, but these errors were encountered: