Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Make it so that AlertDialog.Builder.SetOnCancelListener accepts a delegate/lambda #240

Description

Android.Support.V7.App.AlertDialog.Builder has 4 interesting methods: SetPositiveButton(string, EventHandler<DialogClickEventArgs>), SetNeutralButton(string, EventHandler<DialogClickEventArgs>), SetNegativeButton(string, EventHandler<DialogClickEventArgs>) and SetOnCancelListener(IDialogInterfaceOnCancelListener). While the first 3 make it easy for the developer to set an action for the user input (I can just say SetPositiveButton("Confirm", delegate { MyAction(); }), the fourth one requires the developer to create a class that implements IDialogInterfaceOnCancelListener and implement just this one method OnCancel(IDialogInterface). It would be very helpful if we could do with SetOnCancelListener the same that we do with the others, that being just setting a delegate as the action, for example SetOnCancelListener(delegate { MyAction(); }).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions