I have 2 properties to a class (WPF control): HorizontalOffset
and VerticalOffset
(both public Double
's). I would like to call a method whenever these properties change. How can I do this? I know of one way - but I'm pretty sure it's not the right way (using a DispatcherTimer
of very short tick intervals to monitor the property).
EDIT FOR MORE CONTEXT:
These properties belong to a telerik scheduleview control.
INotifyPropertyChanged
. In this case you're not exposing your own event source, you need to hope that one already exists on that control – BibliopegyPropertyChanged
event and do something when the args.PropertyName is either"HorizontalOffset"
or"VerticalOffset"
– Bibliopegy