void SetMenuItem(MainPage main) { var actionDelete = new MenuItem() { Text = "削除", }; actionDelete.SetBinding(MenuItem.CommandParameterProperty, new Binding(".")); actionDelete.Clicked += (s, e) => main.Action((MenuItem)s); var detail = new MenuItem() { Text = "会計", }; detail.SetBinding(MenuItem.CommandParameterProperty, new Binding(".")); detail.Clicked += (s, e) => main.Action((MenuItem)s); ContextActions.Add(detail); ContextActions.Add(actionDelete); }