[Tizen] Ensuring that Registry.Unregister is called from the most derived class befor...
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / UIComponents / Button.cs
1 // Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 //
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 // Some have been manually changed
18
19 namespace Tizen.NUI.UIComponents
20 {
21
22     using System;
23     using System.Runtime.InteropServices;
24     using Tizen.NUI.BaseComponents;
25
26     /// <summary>
27     /// Button is a base class for different kinds of buttons.<br>
28     /// This class provides the disabled property and the clicked signal.<br>
29     /// A Clicked event handler is emitted when the button is touched and the touch point doesn't leave the boundary of the button.<br>
30     /// When the disabled property is set to true, no signal is emitted.<br>
31     /// 'Visual' describes not just traditional images like png, bmp but refers to whatever is used to show the button, it could be a color, gradient or some other kind of renderer.<br>
32     /// The button's appearance can be modified by setting properties for the various visuals/images.<br>
33     /// It is not mandatory to set all visuals. A button could be defined only by setting its background visual or by setting its background and selected visuals.<br>
34     /// The button visual is shown over the background visual.<br>
35     /// When pressed the unselected visuals are replaced by the selected visual.<br>
36     /// The text label is always placed on the top of all images.<br>
37     /// When the button is disabled, background, button and selected visuals are replaced by their disabled visuals.<br>
38     /// </summary>
39     public class Button : View
40     {
41         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
42
43         internal Button(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Button_SWIGUpcast(cPtr), cMemoryOwn)
44         {
45             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
46         }
47
48         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Button obj)
49         {
50             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
51         }
52
53         /// <summary>
54         /// To make Button instance be disposed.
55         /// </summary>
56         protected override void Dispose(DisposeTypes type)
57         {
58             if (disposed)
59             {
60                 return;
61             }
62
63             if (type == DisposeTypes.Explicit)
64             {
65                 //Called by User
66                 //Release your own managed resources here.
67                 //You should release all of your own disposable objects here.
68
69             }
70
71             //Release your own unmanaged resources here.
72             //You should not access any managed member here except static instance.
73             //because the execution order of Finalizes is non-deterministic.
74
75             if (swigCPtr.Handle != global::System.IntPtr.Zero)
76             {
77                 if (swigCMemOwn)
78                 {
79                     swigCMemOwn = false;
80
81                     //Unreference this instance from Registry.
82                     Registry.Unregister(this);
83
84                     NDalicPINVOKE.delete_Button(swigCPtr);
85                 }
86                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
87             }
88
89             base.Dispose(type);
90         }
91
92
93         private EventHandlerWithReturnType<object, EventArgs, bool> _clickedEventHandler;
94         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
95         private delegate bool ClickedCallbackType(global::System.IntPtr data);
96         private ClickedCallbackType _clickedCallback;
97
98         /// <summary>
99         /// Clicked will be triggered when the button is touched and the touch point doesn't leave the boundary of the button.
100         /// </summary>
101         public event EventHandlerWithReturnType<object, EventArgs, bool> Clicked
102         {
103             add
104             {
105                 if (_clickedEventHandler == null)
106                 {
107                     _clickedCallback = OnClicked;
108                     ClickedSignal().Connect(_clickedCallback);
109                 }
110
111                 _clickedEventHandler += value;
112             }
113
114             remove
115             {
116                 _clickedEventHandler -= value;
117
118                 if (_clickedEventHandler == null && ClickedSignal().Empty() == false)
119                 {
120                     ClickedSignal().Disconnect(_clickedCallback);
121                 }
122             }
123         }
124
125
126         private bool OnClicked(IntPtr data)
127         {
128             if (_clickedEventHandler != null)
129             {
130                 return _clickedEventHandler(this, null);
131             }
132             return false;
133         }
134
135
136
137         private EventHandlerWithReturnType<object, EventArgs, bool> _pressedEventHandler;
138         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
139         private delegate bool PressedCallbackType(global::System.IntPtr data);
140         private PressedCallbackType _pressedCallback;
141
142         /// <summary>
143         /// Pressed will be triggered when the button is touched.
144         /// </summary>
145         public event EventHandlerWithReturnType<object, EventArgs, bool> Pressed
146         {
147             add
148             {
149                 if (_pressedEventHandler == null)
150                 {
151                     _pressedCallback = OnPressed;
152                     PressedSignal().Connect(_pressedCallback);
153                 }
154
155                 _pressedEventHandler += value;
156             }
157
158             remove
159             {
160                 _pressedEventHandler -= value;
161
162                 if (_pressedEventHandler == null && PressedSignal().Empty() == false)
163                 {
164                     this.PressedSignal().Disconnect(_pressedCallback);
165                 }
166             }
167         }
168
169         private bool OnPressed(IntPtr data)
170         {
171             if (_pressedEventHandler != null)
172             {
173                 return _pressedEventHandler(this, null);
174             }
175             return false;
176         }
177
178
179
180         private EventHandlerWithReturnType<object, EventArgs, bool> _releasedEventHandler;
181         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
182         private delegate bool ReleasedCallbackType(global::System.IntPtr data);
183         private ReleasedCallbackType _releasedCallback;
184
185         /// <summary>
186         /// Released will be triggered when the button is touched and the touch point leaves the boundary of the button.
187         /// </summary>
188         public event EventHandlerWithReturnType<object, EventArgs, bool> Released
189         {
190             add
191             {
192                 if (_releasedEventHandler == null)
193                 {
194                     _releasedCallback = OnReleased;
195                     ReleasedSignal().Connect(_releasedCallback);
196                 }
197                 _releasedEventHandler += value;
198             }
199
200             remove
201             {
202                 _releasedEventHandler -= value;
203
204                 if (_releasedEventHandler == null && ReleasedSignal().Empty() == false)
205                 {
206                     ReleasedSignal().Disconnect(_releasedCallback);
207                 }
208
209             }
210         }
211
212         private bool OnReleased(IntPtr data)
213         {
214             if (_releasedEventHandler != null)
215             {
216                 return _releasedEventHandler(this, null);
217             }
218             return false;
219         }
220
221
222         private EventHandlerWithReturnType<object, EventArgs, bool> _stateChangedEventHandler;
223         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
224         private delegate bool StateChangedCallback(global::System.IntPtr data);
225         private StateChangedCallback _stateChangedCallback;
226
227         /// <summary>
228         /// StateChanged will be triggered when the button's state is changed.
229         /// </summary>
230         public event EventHandlerWithReturnType<object, EventArgs, bool> StateChanged
231         {
232             add
233             {
234                 if (_stateChangedEventHandler == null)
235                 {
236                     _stateChangedCallback = OnStateChanged;
237                     StateChangedSignal().Connect(_stateChangedCallback);
238                 }
239
240                 _stateChangedEventHandler += value;
241             }
242
243             remove
244             {
245                 _stateChangedEventHandler -= value;
246
247                 if (_stateChangedEventHandler == null && StateChangedSignal().Empty() == false)
248                 {
249                     StateChangedSignal().Disconnect(_stateChangedCallback);
250                 }
251             }
252         }
253
254         private bool OnStateChanged(IntPtr data)
255         {
256             if (_stateChangedEventHandler != null)
257             {
258                 return _stateChangedEventHandler(this, null);
259             }
260             return false;
261         }
262
263
264         /// <summary>
265         /// Gets/Sets the unselected button foreground/icon visual
266         /// </summary>
267         public Tizen.NUI.PropertyMap UnselectedVisual
268         {
269             get
270             {
271                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
272                 GetProperty(Button.Property.UNSELECTED_VISUAL).Get(temp);
273                 return temp;
274             }
275             set
276             {
277                 SetProperty(Button.Property.UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
278             }
279         }
280
281         /// <summary>
282         /// Gets/Sets the selected button foreground/icon visual
283         /// </summary>
284         public Tizen.NUI.PropertyMap SelectedVisual
285         {
286             get
287             {
288                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
289                 GetProperty(Button.Property.SELECTED_VISUAL).Get(temp);
290                 return temp;
291             }
292             set
293             {
294                 SetProperty(Button.Property.SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
295             }
296         }
297
298         /// <summary>
299         /// Gets/Sets the disabled selected state foreground/icon button visual
300         /// </summary>
301         public Tizen.NUI.PropertyMap DisabledSelectedVisual
302         {
303             get
304             {
305                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
306                 GetProperty(Button.Property.DISABLED_SELECTED_VISUAL).Get(temp);
307                 return temp;
308             }
309             set
310             {
311                 SetProperty(Button.Property.DISABLED_SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
312             }
313         }
314
315         /// <summary>
316         /// Gets/Sets the disabled unselected state foreground/icon visual
317         /// </summary>
318         public Tizen.NUI.PropertyMap DisabledUnselectedVisual
319         {
320             get
321             {
322                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
323                 GetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL).Get(temp);
324                 return temp;
325             }
326             set
327             {
328                 SetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
329             }
330         }
331
332         /// <summary>
333         /// Gets/Sets the disabled in the unselected state background, button visual
334         /// </summary>
335         public Tizen.NUI.PropertyMap UnselectedBackgroundVisual
336         {
337             get
338             {
339                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
340                 GetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL).Get(temp);
341                 return temp;
342             }
343             set
344             {
345                 SetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
346             }
347         }
348
349         /// <summary>
350         /// Gets/Sets the selected background button visual
351         /// </summary>
352         public Tizen.NUI.PropertyMap SelectedBackgroundVisual
353         {
354             get
355             {
356                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
357                 GetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL).Get(temp);
358                 return temp;
359             }
360             set
361             {
362                 SetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
363             }
364         }
365
366         /// <summary>
367         /// Gets/Sets the disabled while unselected background button visual
368         /// </summary>
369         public Tizen.NUI.PropertyMap DisabledUnselectedBackgroundVisual
370         {
371             get
372             {
373                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
374                 GetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL).Get(temp);
375                 return temp;
376             }
377             set
378             {
379                 SetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
380             }
381         }
382
383         /// <summary>
384         /// Gets/Sets the disabled while selected background button visual
385         /// </summary>
386         public Tizen.NUI.PropertyMap DisabledSelectedBackgroundVisual
387         {
388             get
389             {
390                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
391                 GetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL).Get(temp);
392                 return temp;
393             }
394             set
395             {
396                 SetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
397             }
398         }
399
400         /// <summary>
401         /// Gets/Sets the position of the the label in relation to the foreground/icon if both present
402         /// </summary>
403         public Align LabelRelativeAlignment
404         {
405             get
406             {
407                 string temp;
408                 if (GetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT).Get(out temp) == false)
409                 {
410                     NUILog.Error("LabelRelativeAlignment get error!");
411                 }
412                 switch (temp)
413                 {
414                     case "BEGIN":
415                         return Align.Begin;
416                     case "END":
417                         return Align.End;
418                     case "TOP":
419                         return Align.Top;
420                     case "BOTTOM":
421                         return Align.Bottom;
422                     default:
423                         return Align.End;
424                 }
425             }
426             set
427             {
428                 string valueToString = "";
429                 switch (value)
430                 {
431                     case Align.Begin:
432                     {
433                         valueToString = "BEGIN";
434                         break;
435                     }
436                     case Align.End:
437                     {
438                         valueToString = "END";
439                         break;
440                     }
441                     case Align.Top:
442                     {
443                         valueToString = "TOP";
444                         break;
445                     }
446                     case Align.Bottom:
447                     {
448                         valueToString = "BOTTOM";
449                         break;
450                     }
451                     default:
452                     {
453                         valueToString = "END";
454                         break;
455                     }
456                 }
457                 SetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
458             }
459         }
460
461         /// <summary>
462         /// Gets/Sets the padding around the text
463         /// </summary>
464         public Vector4 LabelPadding
465         {
466             get
467             {
468                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
469                 GetProperty(Button.Property.LABEL_PADDING).Get(temp);
470                 return temp;
471             }
472             set
473             {
474                 SetProperty(Button.Property.LABEL_PADDING, new Tizen.NUI.PropertyValue(value));
475             }
476         }
477
478         /// <summary>
479         /// Gets/Sets the padding around the foreground visual
480         /// </summary>
481         public Vector4 ForegroundVisualPadding
482         {
483             get
484             {
485                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
486                 GetProperty(Button.Property.FOREGROUND_VISUAL_PADDING).Get(temp);
487                 return temp;
488             }
489             set
490             {
491                 SetProperty(Button.Property.FOREGROUND_VISUAL_PADDING, new Tizen.NUI.PropertyValue(value));
492             }
493         }
494
495         internal class Property
496         {
497             internal static readonly int UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_VISUAL_get();
498             internal static readonly int SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_VISUAL_get();
499             internal static readonly int DISABLED_SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_VISUAL_get();
500             internal static readonly int DISABLED_UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_VISUAL_get();
501             internal static readonly int UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_BACKGROUND_VISUAL_get();
502             internal static readonly int SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_BACKGROUND_VISUAL_get();
503             internal static readonly int DISABLED_UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_BACKGROUND_VISUAL_get();
504             internal static readonly int DISABLED_SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_BACKGROUND_VISUAL_get();
505             internal static readonly int LABEL_RELATIVE_ALIGNMENT = NDalicManualPINVOKE.Button_Property_LABEL_RELATIVE_ALIGNMENT_get();
506             internal static readonly int LABEL_PADDING = NDalicManualPINVOKE.Button_Property_LABEL_PADDING_get();
507             internal static readonly int FOREGROUND_VISUAL_PADDING = NDalicManualPINVOKE.Button_Property_VISUAL_PADDING_get();
508             internal static readonly int AUTO_REPEATING = NDalicPINVOKE.Button_Property_AUTO_REPEATING_get();
509             internal static readonly int INITIAL_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_INITIAL_AUTO_REPEATING_DELAY_get();
510             internal static readonly int NEXT_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_NEXT_AUTO_REPEATING_DELAY_get();
511             internal static readonly int TOGGLABLE = NDalicPINVOKE.Button_Property_TOGGLABLE_get();
512             internal static readonly int SELECTED = NDalicPINVOKE.Button_Property_SELECTED_get();
513             internal static readonly int UNSELECTED_COLOR = NDalicPINVOKE.Button_Property_UNSELECTED_COLOR_get();
514             internal static readonly int SELECTED_COLOR = NDalicPINVOKE.Button_Property_SELECTED_COLOR_get();
515             internal static readonly int LABEL = NDalicPINVOKE.Button_Property_LABEL_get();
516         }
517
518         /// <summary>
519         /// Creates an uninitialized Button.<br>
520         /// Only derived versions can be instantiated.<br>
521         /// </summary>
522         public Button() : this(NDalicPINVOKE.new_Button__SWIG_0(), true)
523         {
524             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
525         }
526
527         internal ButtonSignal PressedSignal()
528         {
529             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_PressedSignal(swigCPtr), false);
530             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
531             return ret;
532         }
533
534         internal ButtonSignal ReleasedSignal()
535         {
536             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ReleasedSignal(swigCPtr), false);
537             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
538             return ret;
539         }
540
541         internal ButtonSignal ClickedSignal()
542         {
543             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ClickedSignal(swigCPtr), false);
544             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
545             return ret;
546         }
547
548         internal ButtonSignal StateChangedSignal()
549         {
550             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_StateChangedSignal(swigCPtr), false);
551             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
552             return ret;
553         }
554
555         /// <summary>
556         /// If the autorepeating property is set to true then the togglable property is set to false.
557         /// </summary>
558         public bool AutoRepeating
559         {
560             get
561             {
562                 bool temp = false;
563                 GetProperty(Button.Property.AUTO_REPEATING).Get(out temp);
564                 return temp;
565             }
566             set
567             {
568                 SetProperty(Button.Property.AUTO_REPEATING, new Tizen.NUI.PropertyValue(value));
569             }
570         }
571
572         /// <summary>
573         /// By default this value is set to 0.15 seconds.
574         /// </summary>
575         public float InitialAutoRepeatingDelay
576         {
577             get
578             {
579                 float temp = 0.0f;
580                 GetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY).Get(out temp);
581                 return temp;
582             }
583             set
584             {
585                 SetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value));
586             }
587         }
588
589         /// <summary>
590         /// default this value is set to 0.05 seconds.
591         /// </summary>
592         public float NextAutoRepeatingDelay
593         {
594             get
595             {
596                 float temp = 0.0f;
597                 GetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY).Get(out temp);
598                 return temp;
599             }
600             set
601             {
602                 SetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value));
603             }
604         }
605
606         /// <summary>
607         /// If the togglable property is set to true, then the autorepeating property is set to false.
608         /// </summary>
609         public bool Togglable
610         {
611             get
612             {
613                 bool temp = false;
614                 GetProperty(Button.Property.TOGGLABLE).Get(out temp);
615                 return temp;
616             }
617             set
618             {
619                 SetProperty(Button.Property.TOGGLABLE, new Tizen.NUI.PropertyValue(value));
620             }
621         }
622
623         /// <summary>
624         /// /Gets/Sets the togglable button as either selected or unselected, togglable property must be set to true.
625         /// </summary>
626         public bool Selected
627         {
628             get
629             {
630                 bool temp = false;
631                 GetProperty(Button.Property.SELECTED).Get(out temp);
632                 return temp;
633             }
634             set
635             {
636                 SetProperty(Button.Property.SELECTED, new Tizen.NUI.PropertyValue(value));
637             }
638         }
639
640         /// <summary>
641         /// Gets/Sets unselected color.
642         /// </summary>
643         public Color UnselectedColor
644         {
645             get
646             {
647                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
648                 GetProperty(Button.Property.UNSELECTED_COLOR).Get(temp);
649                 return temp;
650             }
651             set
652             {
653                 SetProperty(Button.Property.UNSELECTED_COLOR, new Tizen.NUI.PropertyValue(value));
654             }
655         }
656
657         /// <summary>
658         /// Gets/Sets selected color.
659         /// </summary>
660         public Color SelectedColor
661         {
662             get
663             {
664                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
665                 GetProperty(Button.Property.SELECTED_COLOR).Get(temp);
666                 return temp;
667             }
668             set
669             {
670                 SetProperty(Button.Property.SELECTED_COLOR, new Tizen.NUI.PropertyValue(value));
671             }
672         }
673
674         /// <summary>
675         /// Gets/Sets label.
676         /// </summary>
677         public Tizen.NUI.PropertyMap Label
678         {
679             get
680             {
681                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
682                 GetProperty(Button.Property.LABEL).Get(temp);
683                 return temp;
684             }
685             set
686             {
687                 SetProperty(Button.Property.LABEL, new Tizen.NUI.PropertyValue(value));
688             }
689         }
690
691         /// <summary>
692         /// Gets/Sets text of label.
693         /// </summary>
694         public string LabelText
695         {
696             get
697             {
698                 Tizen.NUI.PropertyMap map = new Tizen.NUI.PropertyMap();
699                 GetProperty( Button.Property.LABEL).Get(map);
700                 Tizen.NUI.PropertyValue value = map.Find( TextVisualProperty.Text, "Text");
701                 string str;
702                 value.Get(out str);
703                 return str;
704             }
705             set
706             {
707                 SetProperty( Button.Property.LABEL, new Tizen.NUI.PropertyValue( value ) );
708             }
709         }
710
711         /// <summary>
712         /// Enumeration for describing the position the text label can be in relation to the control(and foreground/icon).
713         /// </summary>
714         public enum Align
715         {
716             /// <summary>
717             /// At the start of the control before the foreground/icon
718             /// </summary>
719             Begin,
720             /// <summary>
721             /// At the end of the control after the foreground/icon
722             /// </summary>
723             End,
724             /// <summary>
725             /// At the top of the control above the foreground/icon
726             /// </summary>
727             Top,
728             /// <summary>
729             /// At the bottom of the control below the foreground/icon
730             /// </summary>
731             Bottom
732         }
733
734     }
735
736 }