[NUI] Reduce code duplication - refactor dispose codes (#1010)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / UIComponents / Popup.cs
1 /*
2  * Copyright(c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 using System;
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
20 using Tizen.NUI.BaseComponents;
21 using Tizen.NUI.Binding;
22
23 namespace Tizen.NUI.UIComponents
24 {
25     /// <summary>
26     /// The Popup widget provides a configurable popup dialog with a built-in layout of three main fields.
27     /// </summary>
28     /// <since_tizen> 3 </since_tizen>
29     public class Popup : View
30     {
31         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
32         [EditorBrowsable(EditorBrowsableState.Never)]
33         public static readonly BindableProperty TitleProperty = BindableProperty.Create("Title", typeof(PropertyMap), typeof(Popup), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
34         {
35             var popup = (Popup)bindable;
36             if (newValue != null)
37             {
38                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.TITLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
39             }
40         },
41         defaultValueCreator:(bindable) =>
42         {
43             var popup = (Popup)bindable;
44             PropertyMap temp = new PropertyMap();
45             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.TITLE).Get(temp);
46             return temp;
47         });
48         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
49         [EditorBrowsable(EditorBrowsableState.Never)]
50         public static readonly BindableProperty ContentProperty = BindableProperty.Create("Content", typeof(PropertyMap), typeof(Popup), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
51         {
52             var popup = (Popup)bindable;
53             if (newValue != null)
54             {
55                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.CONTENT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
56             }
57         },
58         defaultValueCreator:(bindable) =>
59         {
60             var popup = (Popup)bindable;
61             PropertyMap temp = new PropertyMap();
62             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.CONTENT).Get(temp);
63             return temp;
64         });
65         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
66         [EditorBrowsable(EditorBrowsableState.Never)]
67         public static readonly BindableProperty FooterProperty = BindableProperty.Create("Footer", typeof(PropertyMap), typeof(Popup), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
68         {
69             var popup = (Popup)bindable;
70             if (newValue != null)
71             {
72                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.FOOTER, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
73             }
74         },
75         defaultValueCreator:(bindable) =>
76         {
77             var popup = (Popup)bindable;
78             PropertyMap temp = new PropertyMap();
79             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.FOOTER).Get(temp);
80             return temp;
81         });
82         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
83         [EditorBrowsable(EditorBrowsableState.Never)]
84         public static readonly BindableProperty DisplayStateProperty = BindableProperty.Create("DisplayState", typeof(DisplayStateType), typeof(Popup), DisplayStateType.Hidden, propertyChanged: (bindable, oldValue, newValue) =>
85         {
86             var popup = (Popup)bindable;
87             string valueToString = "";
88             if (newValue != null)
89             {
90                 switch ((DisplayStateType)newValue)
91                 {
92                     case DisplayStateType.Showing:
93                         {
94                             valueToString = "SHOWING";
95                             break;
96                         }
97                     case DisplayStateType.Shown:
98                         {
99                             valueToString = "SHOWN";
100                             break;
101                         }
102                     case DisplayStateType.Hiding:
103                         {
104                             valueToString = "HIDING";
105                             break;
106                         }
107                     case DisplayStateType.Hidden:
108                         {
109                             valueToString = "HIDDEN";
110                             break;
111                         }
112                     default:
113                         {
114                             valueToString = "HIDDEN";
115                             break;
116                         }
117                 }
118                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.DISPLAY_STATE, new Tizen.NUI.PropertyValue(valueToString));
119             }
120         },
121         defaultValueCreator:(bindable) =>
122         {
123             var popup = (Popup)bindable;
124             string temp;
125             if (Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.DISPLAY_STATE).Get(out temp) == false)
126             {
127                 NUILog.Error("DisplayState get error!");
128             }
129             switch (temp)
130             {
131                 case "SHOWING":
132                     return DisplayStateType.Showing;
133                 case "SHOWN":
134                     return DisplayStateType.Shown;
135                 case "HIDING":
136                     return DisplayStateType.Hiding;
137                 case "HIDDEN":
138                     return DisplayStateType.Hidden;
139                 default:
140                     return DisplayStateType.Hidden;
141             }
142         });
143         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
144         [EditorBrowsable(EditorBrowsableState.Never)]
145         public static readonly BindableProperty TouchTransparentProperty = BindableProperty.Create("TouchTransparent", typeof(bool), typeof(Popup), false, propertyChanged: (bindable, oldValue, newValue) =>
146         {
147             var popup = (Popup)bindable;
148             if (newValue != null)
149             {
150                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.TOUCH_TRANSPARENT, new Tizen.NUI.PropertyValue((bool)newValue));
151             }
152         },
153         defaultValueCreator:(bindable) =>
154         {
155             var popup = (Popup)bindable;
156             bool temp = false;
157             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.TOUCH_TRANSPARENT).Get(out temp);
158             return temp;
159         });
160         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
161         [EditorBrowsable(EditorBrowsableState.Never)]
162         public static readonly BindableProperty TailVisibilityProperty = BindableProperty.Create("TailVisibility", typeof(bool), typeof(Popup), false, propertyChanged: (bindable, oldValue, newValue) =>
163         {
164             var popup = (Popup)bindable;
165             if (newValue != null)
166             {
167                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.TAIL_VISIBILITY, new Tizen.NUI.PropertyValue((bool)newValue));
168             }
169         },
170         defaultValueCreator:(bindable) =>
171         {
172             var popup = (Popup)bindable;
173             bool temp = false;
174             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.TAIL_VISIBILITY).Get(out temp);
175             return temp;
176         });
177         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
178         [EditorBrowsable(EditorBrowsableState.Never)]
179         public static readonly BindableProperty TailPositionProperty = BindableProperty.Create("TailPosition", typeof(Vector3), typeof(Popup), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
180         {
181             var popup = (Popup)bindable;
182             if (newValue != null)
183             {
184                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.TAIL_POSITION, new Tizen.NUI.PropertyValue((Vector3)newValue));
185             }
186         },
187         defaultValueCreator:(bindable) =>
188         {
189             var popup = (Popup)bindable;
190             Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
191             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.TAIL_POSITION).Get(temp);
192             return temp;
193         });
194         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
195         [EditorBrowsable(EditorBrowsableState.Never)]
196         public static readonly BindableProperty ContextualModeProperty = BindableProperty.Create("ContextualMode", typeof(ContextualModeType), typeof(Popup), ContextualModeType.Below, propertyChanged: (bindable, oldValue, newValue) =>
197         {
198             var popup = (Popup)bindable;
199             string valueToString = "";
200             if (newValue != null)
201             {
202                 switch ((ContextualModeType)newValue)
203                 {
204                     case ContextualModeType.NonContextual:
205                     {
206                         valueToString = "NON_CONTEXTUAL";
207                         break;
208                     }
209                     case ContextualModeType.Above:
210                     {
211                         valueToString = "ABOVE";
212                         break;
213                     }
214                     case ContextualModeType.Rright:
215                     {
216                         valueToString = "RIGHT";
217                         break;
218                     }
219                     case ContextualModeType.Below:
220                     {
221                         valueToString = "BELOW";
222                         break;
223                     }
224                     case ContextualModeType.Left:
225                     {
226                         valueToString = "LEFT";
227                         break;
228                     }
229                     default:
230                     {
231                         valueToString = "BELOW";
232                         break;
233                     }
234                 }
235                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.CONTEXTUAL_MODE, new Tizen.NUI.PropertyValue(valueToString));
236             }
237         },
238         defaultValueCreator:(bindable) =>
239         {
240             var popup = (Popup)bindable;
241             string temp;
242             if (Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.CONTEXTUAL_MODE).Get(out temp) == false)
243             {
244                 NUILog.Error("ContextualMode get error!");
245             }
246             switch (temp)
247             {
248                 case "NON_CONTEXTUAL":
249                     return ContextualModeType.NonContextual;
250                 case "ABOVE":
251                     return ContextualModeType.Above;
252                 case "RIGHT":
253                     return ContextualModeType.Rright;
254                 case "BELOW":
255                     return ContextualModeType.Below;
256                 case "LEFT":
257                     return ContextualModeType.Left;
258                 default:
259                     return ContextualModeType.Below;
260             }
261         });
262         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
263         [EditorBrowsable(EditorBrowsableState.Never)]
264         public static readonly BindableProperty AnimationDurationProperty = BindableProperty.Create("AnimationDuration", typeof(float), typeof(Popup), default(float), propertyChanged: (bindable, oldValue, newValue) =>
265         {
266             var popup = (Popup)bindable;
267             if (newValue != null)
268             {
269                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.ANIMATION_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
270             }
271         },
272         defaultValueCreator:(bindable) =>
273         {
274             var popup = (Popup)bindable;
275             float temp = 0.0f;
276             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.ANIMATION_DURATION).Get(out temp);
277             return temp;
278         });
279         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
280         [EditorBrowsable(EditorBrowsableState.Never)]
281         public static readonly BindableProperty AnimationModeProperty = BindableProperty.Create("AnimationMode", typeof(AnimationModeType), typeof(Popup), AnimationModeType.Fade, propertyChanged: (bindable, oldValue, newValue) =>
282         {
283             var popup = (Popup)bindable;
284             string valueToString = "";
285             if (newValue != null)
286             {
287                 switch ((AnimationModeType)newValue)
288                 {
289                     case AnimationModeType.None:
290                     {
291                         valueToString = "NONE";
292                         break;
293                     }
294                     case AnimationModeType.Zoom:
295                     {
296                         valueToString = "ZOOM";
297                         break;
298                     }
299                     case AnimationModeType.Fade:
300                     {
301                         valueToString = "FADE";
302                         break;
303                     }
304                     case AnimationModeType.Custom:
305                     {
306                         valueToString = "CUSTOM";
307                         break;
308                     }
309                     default:
310                     {
311                         valueToString = "FADE";
312                         break;
313                     }
314                 }
315                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.ANIMATION_MODE, new Tizen.NUI.PropertyValue(valueToString));
316             }
317         },
318         defaultValueCreator:(bindable) =>
319         {
320             var popup = (Popup)bindable;
321             string temp;
322             if (Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.ANIMATION_MODE).Get(out temp) == false)
323             {
324                 NUILog.Error("AnimationMode get error!");
325             }
326             switch (temp)
327             {
328                 case "NONE":
329                     return AnimationModeType.None;
330                 case "ZOOM":
331                     return AnimationModeType.Zoom;
332                 case "FADE":
333                     return AnimationModeType.Fade;
334                 case "CUSTOM":
335                     return AnimationModeType.Custom;
336                 default:
337                     return AnimationModeType.Fade;
338             }
339         });
340         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
341         [EditorBrowsable(EditorBrowsableState.Never)]
342         public static readonly BindableProperty EntryAnimationProperty = BindableProperty.Create("EntryAnimation", typeof(PropertyMap), typeof(Popup), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
343         {
344             var popup = (Popup)bindable;
345             if (newValue != null)
346             {
347                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.ENTRY_ANIMATION, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
348             }
349         },
350         defaultValueCreator:(bindable) =>
351         {
352             var popup = (Popup)bindable;
353             PropertyMap temp = new PropertyMap();
354             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.ENTRY_ANIMATION).Get(temp);
355             return temp;
356         });
357         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
358         [EditorBrowsable(EditorBrowsableState.Never)]
359         public static readonly BindableProperty ExitAnimationProperty = BindableProperty.Create("ExitAnimation", typeof(PropertyMap), typeof(Popup), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
360         {
361             var popup = (Popup)bindable;
362             if (newValue != null)
363             {
364                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.EXIT_ANIMATION, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
365             }
366         },
367         defaultValueCreator:(bindable) =>
368         {
369             var popup = (Popup)bindable;
370             PropertyMap temp = new PropertyMap();
371             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.EXIT_ANIMATION).Get(temp);
372             return temp;
373         });
374         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
375         [EditorBrowsable(EditorBrowsableState.Never)]
376         public static readonly BindableProperty AutoHideDelayProperty = BindableProperty.Create("AutoHideDelay", typeof(int), typeof(Popup), default(int), propertyChanged: (bindable, oldValue, newValue) =>
377         {
378             var popup = (Popup)bindable;
379             if (newValue != null)
380             {
381                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.AUTO_HIDE_DELAY, new Tizen.NUI.PropertyValue((int)newValue));
382             }
383         },
384         defaultValueCreator:(bindable) =>
385         {
386             var popup = (Popup)bindable;
387             int temp = 0;
388             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.AUTO_HIDE_DELAY).Get(out temp);
389             return temp;
390         });
391         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
392         [EditorBrowsable(EditorBrowsableState.Never)]
393         public static readonly BindableProperty BackingEnabledProperty = BindableProperty.Create("BackingEnabled", typeof(bool), typeof(Popup), false, propertyChanged: (bindable, oldValue, newValue) =>
394         {
395             var popup = (Popup)bindable;
396             if (newValue != null)
397             {
398                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.BACKING_ENABLED, new Tizen.NUI.PropertyValue((bool)newValue));
399             }
400         },
401         defaultValueCreator:(bindable) =>
402         {
403             var popup = (Popup)bindable;
404             bool temp = false;
405             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.BACKING_ENABLED).Get(out temp);
406             return temp;
407         });
408         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
409         [EditorBrowsable(EditorBrowsableState.Never)]
410         public static readonly BindableProperty BackingColorProperty = BindableProperty.Create("BackingColor", typeof(Vector4), typeof(Popup), Vector4.Zero, propertyChanged: (bindable, oldValue, newValue) =>
411         {
412             var popup = (Popup)bindable;
413             if (newValue != null)
414             {
415                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.BACKING_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
416             }
417         },
418         defaultValueCreator:(bindable) =>
419         {
420             var popup = (Popup)bindable;
421             Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
422             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.BACKING_COLOR).Get(temp);
423             return temp;
424         });
425         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
426         [EditorBrowsable(EditorBrowsableState.Never)]
427         public static readonly BindableProperty PopupBackgroundImageProperty = BindableProperty.Create("PopupBackgroundImage", typeof(string), typeof(Popup), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
428         {
429             var popup = (Popup)bindable;
430             if (newValue != null)
431             {
432                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.POPUP_BACKGROUND_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
433             }
434         },
435         defaultValueCreator:(bindable) =>
436         {
437             var popup = (Popup)bindable;
438             string temp;
439             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.POPUP_BACKGROUND_IMAGE).Get(out temp);
440             return temp;
441         });
442         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
443         [EditorBrowsable(EditorBrowsableState.Never)]
444         public static readonly BindableProperty PopupBackgroundBorderProperty = BindableProperty.Create("PopupBackgroundBorder", typeof(Rectangle), typeof(Popup), new Rectangle(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
445         {
446             var popup = (Popup)bindable;
447             if (newValue != null)
448             {
449                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.POPUP_BACKGROUND_BORDER, new Tizen.NUI.PropertyValue((Rectangle)newValue));
450             }
451         },
452         defaultValueCreator:(bindable) =>
453         {
454             var popup = (Popup)bindable;
455             Rectangle temp = new Rectangle(0, 0, 0, 0);
456             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.POPUP_BACKGROUND_BORDER).Get(temp);
457             return temp;
458         });
459         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
460         [EditorBrowsable(EditorBrowsableState.Never)]
461         public static readonly BindableProperty TailUpImageProperty = BindableProperty.Create("TailUpImage", typeof(string), typeof(Popup), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
462         {
463             var popup = (Popup)bindable;
464             if (newValue != null)
465             {
466                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.TAIL_UP_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
467             }
468         },
469         defaultValueCreator:(bindable) =>
470         {
471             var popup = (Popup)bindable;
472             string temp;
473             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.TAIL_UP_IMAGE).Get(out temp);
474             return temp;
475         });
476         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
477         [EditorBrowsable(EditorBrowsableState.Never)]
478         public static readonly BindableProperty TailDownImageProperty = BindableProperty.Create("TailDownImage", typeof(string), typeof(Popup), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
479         {
480             var popup = (Popup)bindable;
481             if (newValue != null)
482             {
483                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.TAIL_DOWN_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
484             }
485         },
486         defaultValueCreator:(bindable) =>
487         {
488             var popup = (Popup)bindable;
489             string temp;
490             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.TAIL_DOWN_IMAGE).Get(out temp);
491             return temp;
492         });
493         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
494         [EditorBrowsable(EditorBrowsableState.Never)]
495         public static readonly BindableProperty TailLeftImageProperty = BindableProperty.Create("TailLeftImage", typeof(string), typeof(Popup), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
496         {
497             var popup = (Popup)bindable;
498             if (newValue != null)
499             {
500                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.TAIL_LEFT_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
501             }
502         },
503         defaultValueCreator:(bindable) =>
504         {
505             var popup = (Popup)bindable;
506             string temp;
507             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.TAIL_LEFT_IMAGE).Get(out temp);
508             return temp;
509         });
510         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
511         [EditorBrowsable(EditorBrowsableState.Never)]
512         public static readonly BindableProperty TailRightImageProperty = BindableProperty.Create("TailRightImage", typeof(string), typeof(Popup), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
513         {
514             var popup = (Popup)bindable;
515             if (newValue != null)
516             {
517                 Tizen.NUI.Object.SetProperty(popup.swigCPtr, Popup.Property.TAIL_RIGHT_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
518             }
519         },
520         defaultValueCreator:(bindable) =>
521         {
522             var popup = (Popup)bindable;
523             string temp;
524             Tizen.NUI.Object.GetProperty(popup.swigCPtr, Popup.Property.TAIL_RIGHT_IMAGE).Get(out temp);
525             return temp;
526         });
527
528         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
529         private EventHandler<TouchedOutsideEventArgs> _popUpOutsideTouchedEventHandler;
530         private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate;
531         private EventHandler<ShowingEventArgs> _popUpShowingEventHandler;
532         private ShowingEventCallbackDelegate _popUpShowingEventCallbackDelegate;
533         private EventHandler<ShownEventArgs> _popUpShownEventHandler;
534         private ShownEventCallbackDelegate _popUpShownEventCallbackDelegate;
535         private EventHandler<HidingEventArgs> _popUpHidingEventHandler;
536         private HidingEventCallbackDelegate _popUpHidingEventCallbackDelegate;
537         private EventHandler<HiddenEventArgs> _popUpHiddenEventHandler;
538         private HiddenEventCallbackDelegate _popUpHiddenEventCallbackDelegate;
539
540         /// <summary>
541         /// Creates the popup.
542         /// </summary>
543         /// <since_tizen> 3 </since_tizen>
544         public Popup() : this(Interop.Popup.Popup_New(), true)
545         {
546             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
547         }
548
549         internal Popup(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Popup.Popup_SWIGUpcast(cPtr), cMemoryOwn)
550         {
551             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
552         }
553
554         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
555         private delegate void OutsideTouchedEventCallbackDelegate();
556         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
557         private delegate void ShowingEventCallbackDelegate();
558         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
559         private delegate void ShownEventCallbackDelegate();
560         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
561         private delegate void HidingEventCallbackDelegate();
562         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
563         private delegate void HiddenEventCallbackDelegate();
564
565         /// <summary>
566         /// An event is sent when the user has touched outside the dialog.
567         /// </summary>
568         /// <since_tizen> 3 </since_tizen>
569         public event EventHandler<TouchedOutsideEventArgs> TouchedOutside
570         {
571             add
572             {
573                 if (_popUpOutsideTouchedEventHandler == null)
574                 {
575                     _popUpOutsideTouchedEventCallbackDelegate = (OnOutsideTouched);
576                     OutsideTouchedSignal().Connect(_popUpOutsideTouchedEventCallbackDelegate);
577                 }
578                 _popUpOutsideTouchedEventHandler += value;
579             }
580             remove
581             {
582                 _popUpOutsideTouchedEventHandler -= value;
583                 if (_popUpOutsideTouchedEventHandler == null && OutsideTouchedSignal().Empty() == false)
584                 {
585                     this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate);
586                 }
587             }
588         }
589
590         /// <summary>
591         /// An event is sent when the popup starts showing.
592         /// </summary>
593         /// <since_tizen> 3 </since_tizen>
594         public event EventHandler<ShowingEventArgs> Showing
595         {
596             add
597             {
598                 if (_popUpShowingEventHandler == null)
599                 {
600                     _popUpShowingEventCallbackDelegate = (OnShowing);
601                     ShowingSignal().Connect(_popUpShowingEventCallbackDelegate);
602                 }
603                 _popUpShowingEventHandler += value;
604             }
605             remove
606             {
607                 _popUpShowingEventHandler -= value;
608                 if (_popUpShowingEventHandler == null && ShowingSignal().Empty() == false)
609                 {
610                     ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate);
611                 }
612             }
613         }
614
615         /// <summary>
616         /// An event is sent when the popup has been fully displayed.
617         /// </summary>
618         /// <since_tizen> 3 </since_tizen>
619         public event EventHandler<ShownEventArgs> Shown
620         {
621             add
622             {
623                 if (_popUpShownEventHandler == null)
624                 {
625                     _popUpShownEventCallbackDelegate = (OnShown);
626                     ShownSignal().Connect(_popUpShownEventCallbackDelegate);
627                 }
628                 _popUpShownEventHandler += value;
629             }
630             remove
631             {
632                 _popUpShownEventHandler -= value;
633                 if (_popUpShownEventHandler == null && ShownSignal().Empty() == false)
634                 {
635                     ShownSignal().Disconnect(_popUpShownEventCallbackDelegate);
636                 }
637             }
638         }
639
640         /// <summary>
641         /// An event is sent when the popup starts to hide.
642         /// </summary>
643         /// <since_tizen> 3 </since_tizen>
644         public event EventHandler<HidingEventArgs> Hiding
645         {
646             add
647             {
648                 if (_popUpHidingEventHandler == null)
649                 {
650                     _popUpHidingEventCallbackDelegate = (OnHiding);
651                     HidingSignal().Connect(_popUpHidingEventCallbackDelegate);
652                 }
653                 _popUpHidingEventHandler += value;
654             }
655             remove
656             {
657                 _popUpHidingEventHandler -= value;
658                 if (_popUpHidingEventHandler == null && HidingSignal().Empty() == false)
659                 {
660                     HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
661                 }
662             }
663         }
664
665         /// <summary>
666         /// An event is sent when the popup has been completely hidden.
667         /// </summary>
668         /// <since_tizen> 3 </since_tizen>
669         public event EventHandler<HiddenEventArgs> Hidden
670         {
671             add
672             {
673                 if (_popUpHiddenEventHandler == null)
674                 {
675                     _popUpHiddenEventCallbackDelegate = (OnHidden);
676                     HiddenSignal().Connect(_popUpHiddenEventCallbackDelegate);
677                 }
678                 _popUpHiddenEventHandler += value;
679             }
680             remove
681             {
682                 _popUpHiddenEventHandler -= value;
683                 if (_popUpHiddenEventHandler == null && HiddenSignal().Empty() == false)
684                 {
685                     HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
686                 }
687             }
688         }
689
690         /// <summary>
691         /// The display states of the popup.
692         /// </summary>
693         /// <since_tizen> 3 </since_tizen>
694         public enum DisplayStateType
695         {
696             /// <summary>
697             /// The popup is transitioning in
698             /// </summary>
699             /// <since_tizen> 3 </since_tizen>
700             Showing,
701             /// <summary>
702             /// The popup is fully shown
703             /// </summary>
704             /// <since_tizen> 3 </since_tizen>
705             Shown,
706             /// <summary>
707             /// The popup is transitioning out
708             /// </summary>
709             /// <since_tizen> 3 </since_tizen>
710             Hiding,
711             /// <summary>
712             /// The popup is fully hidden
713             /// </summary>
714             /// <since_tizen> 3 </since_tizen>
715             Hidden
716         }
717
718         /// <summary>
719         /// The animation modes within the popup.<br />
720         /// Choose from a predefined mode or "CUSTOM" to use the ANIMATION_IN and ANIMATION_OUT properties.<br />
721         /// </summary>
722         /// <since_tizen> 3 </since_tizen>
723         public enum AnimationModeType
724         {
725             /// <summary>
726             /// No animation.
727             /// </summary>
728             /// <since_tizen> 3 </since_tizen>
729             None,
730             /// <summary>
731             /// Popup zooms in and out animating the scale property.
732             /// </summary>
733             /// <since_tizen> 3 </since_tizen>
734             Zoom,
735             /// <summary>
736             /// Popup fades in and out
737             /// </summary>
738             /// <since_tizen> 3 </since_tizen>
739             Fade,
740             /// <summary>
741             /// Use the EntryAnimation and ExitAnimation animation properties.
742             /// </summary>
743             /// <since_tizen> 3 </since_tizen>
744             Custom
745         }
746
747         /// <summary>
748         /// The types of the contextual layout.<br />
749         /// The popup is positioned adjacent to it's parent in the direction specified by this mode.<br />
750         /// NON_CONTEXTUAL disables any contextual positioning.<br />
751         /// </summary>
752         /// <since_tizen> 3 </since_tizen>
753         public enum ContextualModeType
754         {
755             /// <summary>
756             /// any contextual positioning
757             /// </summary>
758             /// <since_tizen> 3 </since_tizen>
759             NonContextual,
760             /// <summary>
761             /// Above
762             /// </summary>
763             /// <since_tizen> 3 </since_tizen>
764             Above,
765             /// <summary>
766             /// Rright
767             /// </summary>
768             /// <since_tizen> 3 </since_tizen>
769             Rright,
770             /// <summary>
771             /// Below
772             /// </summary>
773             /// <since_tizen> 3 </since_tizen>
774             Below,
775             /// <summary>
776             /// Left
777             /// </summary>
778             /// <since_tizen> 3 </since_tizen>
779             Left
780         }
781
782         /// <summary>
783         /// The popup title.
784         /// </summary>
785         /// <since_tizen> 3 </since_tizen>
786         public PropertyMap Title
787         {
788             get
789             {
790                 return (PropertyMap)GetValue(TitleProperty);
791             }
792             set
793             {
794                 SetValue(TitleProperty, value);
795             }
796         }
797
798         /// <summary>
799         /// The popup content.
800         /// </summary>
801         /// <since_tizen> 3 </since_tizen>
802         public PropertyMap Content
803         {
804             get
805             {
806                 return (PropertyMap)GetValue(ContentProperty);
807             }
808             set
809             {
810                 SetValue(ContentProperty, value);
811             }
812         }
813
814         /// <summary>
815         /// The popup footer.
816         /// </summary>
817         /// <since_tizen> 3 </since_tizen>
818         public PropertyMap Footer
819         {
820             get
821             {
822                 return (PropertyMap)GetValue(FooterProperty);
823             }
824             set
825             {
826                 SetValue(FooterProperty, value);
827             }
828         }
829
830         /// <summary>
831         /// The popup display state.
832         /// </summary>
833         /// <since_tizen> 3 </since_tizen>
834         public DisplayStateType DisplayState
835         {
836             get
837             {
838                 return (DisplayStateType)GetValue(DisplayStateProperty);
839             }
840             set
841             {
842                 SetValue(DisplayStateProperty, value);
843             }
844         }
845
846         /// <summary>
847         /// The touch transparent.
848         /// </summary>
849         /// <since_tizen> 3 </since_tizen>
850         public bool TouchTransparent
851         {
852             get
853             {
854                 return (bool)GetValue(TouchTransparentProperty);
855             }
856             set
857             {
858                 SetValue(TouchTransparentProperty, value);
859             }
860         }
861
862         /// <summary>
863         /// The popup tail visibility.
864         /// </summary>
865         /// <since_tizen> 3 </since_tizen>
866         public bool TailVisibility
867         {
868             get
869             {
870                 return (bool)GetValue(TailVisibilityProperty);
871             }
872             set
873             {
874                 SetValue(TailVisibilityProperty, value);
875             }
876         }
877
878         /// <summary>
879         /// The popup tail position.
880         /// </summary>
881         /// <since_tizen> 3 </since_tizen>
882         public Vector3 TailPosition
883         {
884             get
885             {
886                 return (Vector3)GetValue(TailPositionProperty);
887             }
888             set
889             {
890                 SetValue(TailPositionProperty, value);
891             }
892         }
893
894         /// <summary>
895         /// The contextual mode.
896         /// </summary>
897         /// <since_tizen> 3 </since_tizen>
898         public ContextualModeType ContextualMode
899         {
900             get
901             {
902                 return (ContextualModeType)GetValue(ContextualModeProperty);
903             }
904             set
905             {
906                 SetValue(ContextualModeProperty, value);
907             }
908         }
909
910         /// <summary>
911         /// The animation duration.
912         /// </summary>
913         /// <since_tizen> 3 </since_tizen>
914         public float AnimationDuration
915         {
916             get
917             {
918                 return (float)GetValue(AnimationDurationProperty);
919             }
920             set
921             {
922                 SetValue(AnimationDurationProperty, value);
923             }
924         }
925
926         /// <summary>
927         /// The animation mode.
928         /// </summary>
929         /// <since_tizen> 3 </since_tizen>
930         public AnimationModeType AnimationMode
931         {
932             get
933             {
934                 return (AnimationModeType)GetValue(AnimationModeProperty);
935             }
936             set
937             {
938                 SetValue(AnimationModeProperty, value);
939             }
940         }
941
942         /// <summary>
943         /// The entry animation.
944         /// </summary>
945         /// <since_tizen> 3 </since_tizen>
946         public PropertyMap EntryAnimation
947         {
948             get
949             {
950                 return (PropertyMap)GetValue(EntryAnimationProperty);
951             }
952             set
953             {
954                 SetValue(EntryAnimationProperty, value);
955             }
956         }
957
958         /// <summary>
959         /// The exit animation.
960         /// </summary>
961         /// <since_tizen> 3 </since_tizen>
962         public PropertyMap ExitAnimation
963         {
964             get
965             {
966                 return (PropertyMap)GetValue(ExitAnimationProperty);
967             }
968             set
969             {
970                 SetValue(ExitAnimationProperty, value);
971             }
972         }
973
974         /// <summary>
975         /// The auto hide delay.
976         /// </summary>
977         /// <since_tizen> 3 </since_tizen>
978         public int AutoHideDelay
979         {
980             get
981             {
982                 return (int)GetValue(AutoHideDelayProperty);
983             }
984             set
985             {
986                 SetValue(AutoHideDelayProperty, value);
987             }
988         }
989
990         /// <summary>
991         /// The backing enabled.
992         /// </summary>
993         /// <since_tizen> 3 </since_tizen>
994         public bool BackingEnabled
995         {
996             get
997             {
998                 return (bool)GetValue(BackingEnabledProperty);
999             }
1000             set
1001             {
1002                 SetValue(BackingEnabledProperty, value);
1003             }
1004         }
1005
1006         /// <summary>
1007         /// The backing color.
1008         /// </summary>
1009         /// <since_tizen> 3 </since_tizen>
1010         public Vector4 BackingColor
1011         {
1012             get
1013             {
1014                 return (Vector4)GetValue(BackingColorProperty);
1015             }
1016             set
1017             {
1018                 SetValue(BackingColorProperty, value);
1019             }
1020         }
1021
1022         /// <summary>
1023         /// The background image.
1024         /// </summary>
1025         /// <since_tizen> 3 </since_tizen>
1026         public string PopupBackgroundImage
1027         {
1028             get
1029             {
1030                 return (string)GetValue(PopupBackgroundImageProperty);
1031             }
1032             set
1033             {
1034                 SetValue(PopupBackgroundImageProperty, value);
1035             }
1036         }
1037
1038         /// <summary>
1039         /// The background border.
1040         /// </summary>
1041         /// <since_tizen> 3 </since_tizen>
1042         public Rectangle PopupBackgroundBorder
1043         {
1044             get
1045             {
1046                 return (Rectangle)GetValue(PopupBackgroundBorderProperty);
1047             }
1048             set
1049             {
1050                 SetValue(PopupBackgroundBorderProperty, value);
1051             }
1052         }
1053
1054         /// <summary>
1055         /// The tail up image.
1056         /// </summary>
1057         /// <since_tizen> 3 </since_tizen>
1058         public string TailUpImage
1059         {
1060             get
1061             {
1062                 return (string)GetValue(TailUpImageProperty);
1063             }
1064             set
1065             {
1066                 SetValue(TailUpImageProperty, value);
1067             }
1068         }
1069
1070         /// <summary>
1071         /// The tail down image.
1072         /// </summary>
1073         /// <since_tizen> 3 </since_tizen>
1074         public string TailDownImage
1075         {
1076             get
1077             {
1078                 return (string)GetValue(TailDownImageProperty);
1079             }
1080             set
1081             {
1082                 SetValue(TailDownImageProperty, value);
1083             }
1084         }
1085
1086         /// <summary>
1087         /// The tail left image.
1088         /// </summary>
1089         /// <since_tizen> 3 </since_tizen>
1090         public string TailLeftImage
1091         {
1092             get
1093             {
1094                 return (string)GetValue(TailLeftImageProperty);
1095             }
1096             set
1097             {
1098                 SetValue(TailLeftImageProperty, value);
1099             }
1100         }
1101
1102         /// <summary>
1103         /// The tail right image.
1104         /// </summary>
1105         /// <since_tizen> 3 </since_tizen>
1106         public string TailRightImage
1107         {
1108             get
1109             {
1110                 return (string)GetValue(TailRightImageProperty);
1111             }
1112             set
1113             {
1114                 SetValue(TailRightImageProperty, value);
1115             }
1116         }
1117
1118         /// <summary>
1119         /// Sets the title for this popup.
1120         /// </summary>
1121         /// <param name="titleView">The actor to set the title.</param>
1122         /// <since_tizen> 3 </since_tizen>
1123         public void SetTitle(View titleView)
1124         {
1125             Interop.Popup.Popup_SetTitle(swigCPtr, View.getCPtr(titleView));
1126             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1127         }
1128
1129         /// <summary>
1130         /// Sets the content actor.
1131         /// </summary>
1132         /// <param name="content">The actor to use.</param>
1133         /// <since_tizen> 3 </since_tizen>
1134         public void SetContent(View content)
1135         {
1136             Interop.Popup.Popup_SetContent(swigCPtr, View.getCPtr(content));
1137             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1138         }
1139
1140         /// <summary>
1141         /// Sets the actor to use for the footer in this popup.
1142         /// </summary>
1143         /// <param name="footer">The footer actor to be added to this popup.</param>
1144         /// <since_tizen> 3 </since_tizen>
1145         public void SetFooter(View footer)
1146         {
1147             Interop.Popup.Popup_SetFooter(swigCPtr, View.getCPtr(footer));
1148             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1149         }
1150
1151         /// <summary>
1152         /// Sets the display state of popup.<br />
1153         /// There are 4 total display states.<br />
1154         /// Only 2 can be set, but all four can be read for better inspection of the current popup state.<br />
1155         /// <br />
1156         /// The other two states are getable, but not setable, and are there for consistency.<br />
1157         /// <br />
1158         /// | Value    | Setting the state              | Getting the state              |<br />
1159         /// |----------|--------------------------------|--------------------------------|<br />
1160         /// | SHOWN    | Show the popup                 | The popup is fully shown       |<br />
1161         /// | HIDDEN   | Hide the popup                 | The popup is fully hidden      |<br />
1162         /// | SHOWING  |                                | The popup is transitioning in  |<br />
1163         /// | HIDING   |                                | The popup is transitioning out |<br />
1164         /// <br />
1165         /// All 4 states changes cause notifications via 4 respective signals that can be connected to.<br />
1166         /// </summary>
1167         /// <param name="displayState">The desired display state to change to.</param>
1168         /// <since_tizen> 3 </since_tizen>
1169         public void SetDisplayState(Popup.DisplayStateType displayState)
1170         {
1171             Interop.Popup.Popup_SetDisplayState(swigCPtr, (int)displayState);
1172             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1173         }
1174
1175         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Popup obj)
1176         {
1177             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1178         }
1179
1180         internal View GetTitle()
1181         {
1182             //to fix memory leak issue, match the handle count with native side.
1183             IntPtr cPtr = Interop.Popup.Popup_GetTitle(swigCPtr);
1184             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1185             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
1186             Interop.BaseHandle.delete_BaseHandle(CPtr);
1187             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1188
1189             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1190             return ret;
1191         }
1192
1193         internal View GetContent()
1194         {
1195             //to fix memory leak issue, match the handle count with native side.
1196             IntPtr cPtr = Interop.Popup.Popup_GetContent(swigCPtr);
1197             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1198             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
1199             Interop.BaseHandle.delete_BaseHandle(CPtr);
1200             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1201
1202             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1203             return ret;
1204         }
1205
1206         internal View GetFooter()
1207         {
1208             //to fix memory leak issue, match the handle count with native side.
1209             IntPtr cPtr = Interop.Popup.Popup_GetFooter(swigCPtr);
1210             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1211             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
1212             Interop.BaseHandle.delete_BaseHandle(CPtr);
1213             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1214
1215             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1216             return ret;
1217         }
1218
1219         internal Popup.DisplayStateType GetDisplayState()
1220         {
1221             Popup.DisplayStateType ret = (Popup.DisplayStateType)Interop.Popup.Popup_GetDisplayState(swigCPtr);
1222             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1223             return ret;
1224         }
1225
1226         internal VoidSignal OutsideTouchedSignal()
1227         {
1228             VoidSignal ret = new VoidSignal(Interop.Popup.Popup_OutsideTouchedSignal(swigCPtr), false);
1229             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1230             return ret;
1231         }
1232
1233         internal VoidSignal ShowingSignal()
1234         {
1235             VoidSignal ret = new VoidSignal(Interop.Popup.Popup_ShowingSignal(swigCPtr), false);
1236             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1237             return ret;
1238         }
1239
1240         internal VoidSignal ShownSignal()
1241         {
1242             VoidSignal ret = new VoidSignal(Interop.Popup.Popup_ShownSignal(swigCPtr), false);
1243             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1244             return ret;
1245         }
1246
1247         internal VoidSignal HidingSignal()
1248         {
1249             VoidSignal ret = new VoidSignal(Interop.Popup.Popup_HidingSignal(swigCPtr), false);
1250             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1251             return ret;
1252         }
1253
1254         internal VoidSignal HiddenSignal()
1255         {
1256             VoidSignal ret = new VoidSignal(Interop.Popup.Popup_HiddenSignal(swigCPtr), false);
1257             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1258             return ret;
1259         }
1260
1261         /// <summary>
1262         /// Dispose.
1263         /// </summary>
1264         /// <param name="type">The dispose type</param>
1265         /// <since_tizen> 3 </since_tizen>
1266         protected override void Dispose(DisposeTypes type)
1267         {
1268             if (disposed)
1269             {
1270                 return;
1271             }
1272
1273             //Release your own unmanaged resources here.
1274             //You should not access any managed member here except static instance.
1275             //because the execution order of Finalizes is non-deterministic.
1276             if (this != null)
1277             {
1278                 if (_popUpHiddenEventCallbackDelegate != null)
1279                 {
1280                     HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
1281                 }
1282
1283                 if (_popUpHidingEventCallbackDelegate != null)
1284                 {
1285                     HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
1286                 }
1287             }
1288
1289             if (_popUpShownEventCallbackDelegate != null)
1290             {
1291                 ShownSignal().Disconnect(_popUpShownEventCallbackDelegate);
1292             }
1293
1294             if (_popUpShowingEventCallbackDelegate != null)
1295             {
1296                 ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate);
1297             }
1298
1299             if (_popUpOutsideTouchedEventCallbackDelegate != null)
1300             {
1301                 this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate);
1302             }
1303
1304             if (swigCPtr.Handle != global::System.IntPtr.Zero)
1305             {
1306                 if (swigCMemOwn)
1307                 {
1308                     swigCMemOwn = false;
1309                     Interop.Popup.delete_Popup(swigCPtr);
1310                 }
1311                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1312             }
1313
1314             base.Dispose(type);
1315         }
1316
1317         // Callback for Popup OutsideTouchedSignal
1318         private void OnOutsideTouched()
1319         {
1320             TouchedOutsideEventArgs e = new TouchedOutsideEventArgs();
1321
1322             if (_popUpOutsideTouchedEventHandler != null)
1323             {
1324                 //here we send all data to user event handlers
1325                 _popUpOutsideTouchedEventHandler(this, e);
1326             }
1327         }
1328
1329         // Callback for ShowingSignal
1330         private void OnShowing()
1331         {
1332             ShowingEventArgs e = new ShowingEventArgs();
1333
1334             if (_popUpShowingEventHandler != null)
1335             {
1336                 //here we send all data to user event handlers
1337                 _popUpShowingEventHandler(this, e);
1338             }
1339         }
1340
1341         // Callback for ShownSignal
1342         private void OnShown()
1343         {
1344             ShownEventArgs e = new ShownEventArgs();
1345
1346             if (_popUpShownEventHandler != null)
1347             {
1348                 //here we send all data to user event handlers
1349                 _popUpShownEventHandler(this, e);
1350             }
1351         }
1352
1353         // Callback for HidingSignal
1354         private void OnHiding()
1355         {
1356             HidingEventArgs e = new HidingEventArgs();
1357
1358             if (_popUpHidingEventHandler != null)
1359             {
1360                 //here we send all data to user event handlers
1361                 _popUpHidingEventHandler(this, e);
1362             }
1363         }
1364
1365         // Callback for HiddenSignal
1366         private void OnHidden()
1367         {
1368             HiddenEventArgs e = new HiddenEventArgs();
1369
1370             if (_popUpHiddenEventHandler != null)
1371             {
1372                 //here we send all data to user event handlers
1373                 _popUpHiddenEventHandler(this, e);
1374             }
1375         }
1376
1377         /// <summary>
1378         /// Event arguments that passed via the OutsideTouchedEvent.
1379         /// </summary>
1380         /// <since_tizen> 3 </since_tizen>
1381         public class TouchedOutsideEventArgs : EventArgs
1382         {
1383         }
1384
1385         /// <summary>
1386         /// Event arguments that passed via the ShowingEventArgs.
1387         /// </summary>
1388         /// <since_tizen> 3 </since_tizen>
1389         public class ShowingEventArgs : EventArgs
1390         {
1391         }
1392
1393         /// <summary>
1394         /// Event arguments that passed via the ShownEventArgs.
1395         /// </summary>
1396         /// <since_tizen> 3 </since_tizen>
1397         public class ShownEventArgs : EventArgs
1398         {
1399         }
1400
1401         /// <summary>
1402         /// Event arguments that passed via the HidingEventArgs.
1403         /// </summary>
1404         /// <since_tizen> 3 </since_tizen>
1405         public class HidingEventArgs : EventArgs
1406         {
1407         }
1408
1409         /// <summary>
1410         /// Event arguments that passed via the HiddenEventArgs.
1411         /// </summary>
1412         /// <since_tizen> 3 </since_tizen>
1413         public class HiddenEventArgs : EventArgs
1414         {
1415         }
1416
1417         internal new class Property
1418         {
1419             internal static readonly int TITLE = Interop.Popup.Popup_Property_TITLE_get();
1420             internal static readonly int CONTENT = Interop.Popup.Popup_Property_CONTENT_get();
1421             internal static readonly int FOOTER = Interop.Popup.Popup_Property_FOOTER_get();
1422             internal static readonly int DISPLAY_STATE = Interop.Popup.Popup_Property_DISPLAY_STATE_get();
1423             internal static readonly int TOUCH_TRANSPARENT = Interop.Popup.Popup_Property_TOUCH_TRANSPARENT_get();
1424             internal static readonly int TAIL_VISIBILITY = Interop.Popup.Popup_Property_TAIL_VISIBILITY_get();
1425             internal static readonly int TAIL_POSITION = Interop.Popup.Popup_Property_TAIL_POSITION_get();
1426             internal static readonly int CONTEXTUAL_MODE = Interop.Popup.Popup_Property_CONTEXTUAL_MODE_get();
1427             internal static readonly int ANIMATION_DURATION = Interop.Popup.Popup_Property_ANIMATION_DURATION_get();
1428             internal static readonly int ANIMATION_MODE = Interop.Popup.Popup_Property_ANIMATION_MODE_get();
1429             internal static readonly int ENTRY_ANIMATION = Interop.Popup.Popup_Property_ENTRY_ANIMATION_get();
1430             internal static readonly int EXIT_ANIMATION = Interop.Popup.Popup_Property_EXIT_ANIMATION_get();
1431             internal static readonly int AUTO_HIDE_DELAY = Interop.Popup.Popup_Property_AUTO_HIDE_DELAY_get();
1432             internal static readonly int BACKING_ENABLED = Interop.Popup.Popup_Property_BACKING_ENABLED_get();
1433             internal static readonly int BACKING_COLOR = Interop.Popup.Popup_Property_BACKING_COLOR_get();
1434             internal static readonly int POPUP_BACKGROUND_IMAGE = Interop.Popup.Popup_Property_POPUP_BACKGROUND_IMAGE_get();
1435             internal static readonly int POPUP_BACKGROUND_BORDER = Interop.Popup.Popup_Property_POPUP_BACKGROUND_BORDER_get();
1436             internal static readonly int TAIL_UP_IMAGE = Interop.Popup.Popup_Property_TAIL_UP_IMAGE_get();
1437             internal static readonly int TAIL_DOWN_IMAGE = Interop.Popup.Popup_Property_TAIL_DOWN_IMAGE_get();
1438             internal static readonly int TAIL_LEFT_IMAGE = Interop.Popup.Popup_Property_TAIL_LEFT_IMAGE_get();
1439             internal static readonly int TAIL_RIGHT_IMAGE = Interop.Popup.Popup_Property_TAIL_RIGHT_IMAGE_get();
1440         }
1441     }
1442 }