Call UNO method in UX

If I have in UNO a method like this:

void MyMethod(){
    ....

}

There is a way to call it like this in UX:

<MyMethod />

I need to trigger a method in UNO when a WhileEdgeSwiped is Enabled.

Thanks!

I think this should work:

<WhileEdgeSwiped>
    <Callback Action="MyMethod" />
</WhileEdgeSwiped>

Thanks! Work great!

Hello colleagues, probably you can help me. When I click button the method “doit” does not performed. What is i miss? Thanks.

public class DemoNode : Behavior {

    override protected void OnRooted() {
        Debug.Log("Loaded");        
    }

    public void doit() {
        Debug.Log("-->> do it");
    } 
}
<App>

    <DemoNode ux:Name="demoNode"/>

    <Panel>
        <Button 
            ux:Name="btn"
            Text="Call" 
            Alignment="Center" >

            <Clicked>
                <Callback Action="demoNode.doit" />
            </Clicked>
        </Button>      
    </Panel>

</App>