Button cannot be binded to callback from UI Builder

I’m starting to work with the runtime binding system and it’s great! One thing I feel is missing right now is the ability to bind buttons to callbacks in UI Builder.

Here’s my current setup: I have a class that defines my data model


and I have UI elements bound to the properties. Example:

But when it comes to buttons, it appears I cannot bind the Click event in the inspector.

I’ve seen examples where button behaviors are assigned using UXMLObjects, but I feel like this is not the correct approach. When I build my UI in UI Builder, I don’t want to design what the button will do, that’s for the code to decide. I just want to bind my buttons to the model.

Are there ways to do this that I’m not aware of?

Hi!
It is indeed missing and something that we will eventually add. At the moment, you would need to declare your own custom binding type and implement it yourself.

1 Like

Glad to hear it’s in the pipeline!