How to change TextInput ValueChanged handler within State

As title. I tried but failed with error message ValueChanged is not a valid property path.

<StateGroup ux:Name="state_group">

    <State ux:Name="state_a">
        <Set text_input.ValueChanged="{module_exported_function_a}" />
    </State>

    <State ux:Name="state_b">
        <Set text_input.ValueChanged="{module_exported_function_b}" />
    </State>

</StateGroup>

<TextInput ux:Name="text_input" ValueChanged="{module_exported_function_a}" />

Hi!

You cannot change function bindings like this. You can rather try something like:

<StateGroup Active="{active_state}">

And

var active_state = Observable("state_a");

And then check active_state.value in your callback

Working great. Thanks.