Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
975
OnPropertyChanging
posted

Hi,

I bind my XamDataGrid directly to an ObservableCollection of poco objects. There's a case where I need to publish an Event using EventAggregator in a property set, for example

public Decimal Amount

{

   get { return amount; }

   set { amountSetEvent.Publish(new AmountSetEventArgument(this, value); }

}

But I can't use the event aggregation in that POCO object. So I'm searching, if it's possible to have an OnPropertyChanging event triggered after the user updated the value and before the property is set, with access to the new value and the possibility to cancel the event so that the property is not set. Or any other suggestion are welcome.

Thanks,