Property changed simply not working


<Slider Value="{Binding BrushWidth, Mode=TwoWay}" DataContext="{StaticResource MainPage}"/> 


 [Range(1, 200)] private double _brushWidth; public double BrushWidth { get { return _brushWidth; } set { if (value == _brushWidth) return; _brushWidth = value; OnPropertyChanged(); } } [NotifyPropertyChangedInvocator] private void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } 

Neither of the properties are updating and I have no idea why. Any help?

by lewisj489 via /r/csharp

Leave a Reply