You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespaceRoslynSandbox{using System.Windows;using System.Windows.Controls;publicclassFooControl:Control{publicstaticreadonlyDependencyPropertyValueProperty= DependencyProperty.Register(
nameof(Value),typeof(double),typeof(FooControl),new PropertyMetadata(default(double),(d,e)=>((FooControl)d).OnValueChanged((double)e.OldValue,(double)e.NewValue)));publicdoubleValue{get=>(double)this.GetValue(ValueProperty);set=>this.SetValue(ValueProperty, value);}/// <summary>/// This method is invoked when <see cref="ValueProperty"/> changes value./// </summary>/// <param name="oldValue">The old value of <see cref="ValueProperty"/>.</param>/// <param name="newValue">The new value of <see cref="ValueProperty"/>.</param>protectedvirtualvoidOnValueChanged(doubleoldValue,doublenewValue){}}}
The text was updated successfully, but these errors were encountered:
JohanLarsson
changed the title
New Analyzer: generate property changed callback with virtual instance method
New Analyzer + fix: property changed callback with virtual instance method
Jul 30, 2018
JohanLarsson
changed the title
New Analyzer + fix: property changed callback with virtual instance method
Add property changed callback with virtual instance method
Oct 13, 2020
Default hidden, for convenience.
Before:
After:
The text was updated successfully, but these errors were encountered: