Change internal PropertyChangedEvent to public

Change internal PropertyChangedEvent to public.

That is all. Thank you.

Hi @Enzi, we did consider to make it public as part of the runtime bindings feature, but we decided against it for the time being.

The first reason being performance, as it’s currently using the UI Toolkit event system under the hood (mostly out of convenience) and exposing it publicly would mean quite a lot of events being sent around. It would also share the same limitations that UI Toolkit events have, mainly that the element needs to be in a panel for the event to be sent. We’re also considering to stop using events and directly talk to the binding system directly to squeeze more performance.

Another reason being that this event is usually not what most people want. Most of the time that we’ve been asked to make it public, it was to check on individual properties. This event would make it possible, but it would also require everyone to check the event for specific properties.

The last main reason was that we would prefer to expose this information in a batched way instead. A lot of internal use cases we’ve found needed to check for multiple properties, but reacting to every change immediately wouldn’t be a good thing.

We know it’s something that some users want and we want to expose it, but we’re not convinced that exposing this particular event is the right way to go at it.

Hope this helps!

1 Like