diff --git a/src/Wpf/Prism.Wpf/Common/ObservableObject.cs b/src/Wpf/Prism.Wpf/Common/ObservableObject.cs index 465c66aea..6a49185b2 100644 --- a/src/Wpf/Prism.Wpf/Common/ObservableObject.cs +++ b/src/Wpf/Prism.Wpf/Common/ObservableObject.cs @@ -30,18 +30,14 @@ public partial class ObservableObject : FrameworkElement, INotifyPropertyChan [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] public T Value { - get { return (T)this.GetValue(ValueProperty); } - set { this.SetValue(ValueProperty, value); } + get => (T)GetValue(ValueProperty); + set => SetValue(ValueProperty, value); } private static void ValueChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { ObservableObject thisInstance = ((ObservableObject)d); - PropertyChangedEventHandler eventHandler = thisInstance.PropertyChanged; - if (eventHandler != null) - { - eventHandler(thisInstance, new PropertyChangedEventArgs("Value")); - } + thisInstance.PropertyChanged?.Invoke(thisInstance, new PropertyChangedEventArgs(nameof(Value))); } } }