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 ux:Name="state_b">
        <Set text_input.ValueChanged="{module_exported_function_b}" />


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


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

<StateGroup Active="{active_state}">


var active_state = Observable("state_a");

And then check active_state.value in your callback

Working great. Thanks.