public void MyFunction() { X.Msg.Confirm("Message", "It'OK??", new MessageBoxButtonsConfig { Yes = new MessageBoxButtonConfig { Handler = "CompanyX.It_s_OK()", Text = "OK" }, No = new MessageBoxButtonConfig { Handler = "CompanyX.It_s_KO()", Text = "KO" } }).Show(); } [DirectMethod(Namespace = "CompanyX")] public void It_s_OK() { //your OK function } [DirectMethod(Namespace = "CompanyX")] public void It_s_KO() { //your KO function }