Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.PropertyEditing.Mac')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/ModalWindowCloseDelegate.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ModalWindowCloseDelegate.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ModalWindowCloseDelegate.cs
new file mode 100644
index 0000000..df2506f
--- /dev/null
+++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ModalWindowCloseDelegate.cs
@@ -0,0 +1,16 @@
+using System;
+using AppKit;
+using Foundation;
+
+namespace Xamarin.PropertyEditing.Mac
+{
+ internal class ModalWindowCloseDelegate : NSWindowDelegate
+ {
+ public NSModalResponse Response { get; set; } = NSModalResponse.Cancel;
+
+ public override void WillClose (NSNotification notification)
+ {
+ NSApplication.SharedApplication.StopModalWithCode ((int)Response);
+ }
+ }
+}