+ This demo shows how to pass a can close method
+ Method 1: This passes as method to the dialog options. The dialog will not close if the method returns false. The result needs to be a bool or a Task<bool>
+ Notice if you use this method, you can specify a callback reference where the method is located, if you don't do this the reference is the dialog itself and you need to have the method on your DialogClass in this case SampleDialog
+ Method 2: Uses the IDialogEventService and handles the before close event. Here you can just set args.Cancel to true to stop closing
+
+