How do I implement the same behavior(wpf) in Avalonia?
var leftDescriptor= DependencyPropertyDescriptor.FromProperty(Canvas.LeftProperty, typeof(SomeObject));
leftDescriptor.AddValueChanged(this, OnCanvasLeftChanged);
How do I implement the same behavior(wpf) in Avalonia?
var leftDescriptor= DependencyPropertyDescriptor.FromProperty(Canvas.LeftProperty, typeof(SomeObject));
leftDescriptor.AddValueChanged(this, OnCanvasLeftChanged);
You can just subscribe to changes like this:
Canvas.LeftProperty.Changed.Subscribe(OnCanvasLeftChanged);
Make sure to import the System namespace, otherwise the relevant extension method from System.ObservableExtensions
won't be found by the compiler.