Release 4.0.0-preview1-00051
[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                     NDalicPINVOKE.delete_Button(swigCPtr);
81                 }
82                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
83             }
84
85             base.Dispose(type);
86         }
87
88
89         private EventHandlerWithReturnType<object, EventArgs, bool> _clickedEventHandler;
90         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
91         private delegate bool ClickedCallbackType(global::System.IntPtr data);
92         private ClickedCallbackType _clickedCallback;
93
94         /// <summary>
95         /// Clicked will be triggered when the button is touched and the touch point doesn't leave the boundary of the button.
96         /// </summary>
97         public event EventHandlerWithReturnType<object, EventArgs, bool> Clicked
98         {
99             add
100             {
101                 if (_clickedEventHandler == null)
102                 {
103                     _clickedCallback = OnClicked;
104                     ClickedSignal().Connect(_clickedCallback);
105                 }
106
107                 _clickedEventHandler += value;
108             }
109
110             remove
111             {
112                 _clickedEventHandler -= value;
113
114                 if (_clickedEventHandler == null && ClickedSignal().Empty() == false)
115                 {
116                     ClickedSignal().Disconnect(_clickedCallback);
117                 }
118             }
119         }
120
121
122         private bool OnClicked(IntPtr data)
123         {
124             if (_clickedEventHandler != null)
125             {
126                 return _clickedEventHandler(this, null);
127             }
128             return false;
129         }
130
131
132
133         private EventHandlerWithReturnType<object, EventArgs, bool> _pressedEventHandler;
134         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
135         private delegate bool PressedCallbackType(global::System.IntPtr data);
136         private PressedCallbackType _pressedCallback;
137
138         /// <summary>
139         /// Pressed will be triggered when the button is touched.
140         /// </summary>
141         public event EventHandlerWithReturnType<object, EventArgs, bool> Pressed
142         {
143             add
144             {
145                 if (_pressedEventHandler == null)
146                 {
147                     _pressedCallback = OnPressed;
148                     PressedSignal().Connect(_pressedCallback);
149                 }
150
151                 _pressedEventHandler += value;
152             }
153
154             remove
155             {
156                 _pressedEventHandler -= value;
157
158                 if (_pressedEventHandler == null && PressedSignal().Empty() == false)
159                 {
160                     this.PressedSignal().Disconnect(_pressedCallback);
161                 }
162             }
163         }
164
165         private bool OnPressed(IntPtr data)
166         {
167             if (_pressedEventHandler != null)
168             {
169                 return _pressedEventHandler(this, null);
170             }
171             return false;
172         }
173
174
175
176         private EventHandlerWithReturnType<object, EventArgs, bool> _releasedEventHandler;
177         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
178         private delegate bool ReleasedCallbackType(global::System.IntPtr data);
179         private ReleasedCallbackType _releasedCallback;
180
181         /// <summary>
182         /// Released will be triggered when the button is touched and the touch point leaves the boundary of the button.
183         /// </summary>
184         public event EventHandlerWithReturnType<object, EventArgs, bool> Released
185         {
186             add
187             {
188                 if (_releasedEventHandler == null)
189                 {
190                     _releasedCallback = OnReleased;
191                     ReleasedSignal().Connect(_releasedCallback);
192                 }
193                 _releasedEventHandler += value;
194             }
195
196             remove
197             {
198                 _releasedEventHandler -= value;
199
200                 if (_releasedEventHandler == null && ReleasedSignal().Empty() == false)
201                 {
202                     ReleasedSignal().Disconnect(_releasedCallback);
203                 }
204
205             }
206         }
207
208         private bool OnReleased(IntPtr data)
209         {
210             if (_releasedEventHandler != null)
211             {
212                 return _releasedEventHandler(this, null);
213             }
214             return false;
215         }
216
217
218         private EventHandlerWithReturnType<object, EventArgs, bool> _stateChangedEventHandler;
219         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
220         private delegate bool StateChangedCallback(global::System.IntPtr data);
221         private StateChangedCallback _stateChangedCallback;
222
223         /// <summary>
224         /// StateChanged will be triggered when the button's state is changed.
225         /// </summary>
226         public event EventHandlerWithReturnType<object, EventArgs, bool> StateChanged
227         {
228             add
229             {
230                 if (_stateChangedEventHandler == null)
231                 {
232                     _stateChangedCallback = OnStateChanged;
233                     StateChangedSignal().Connect(_stateChangedCallback);
234                 }
235
236                 _stateChangedEventHandler += value;
237             }
238
239             remove
240             {
241                 _stateChangedEventHandler -= value;
242
243                 if (_stateChangedEventHandler == null && StateChangedSignal().Empty() == false)
244                 {
245                     StateChangedSignal().Disconnect(_stateChangedCallback);
246                 }
247             }
248         }
249
250         private bool OnStateChanged(IntPtr data)
251         {
252             if (_stateChangedEventHandler != null)
253             {
254                 return _stateChangedEventHandler(this, null);
255             }
256             return false;
257         }
258
259
260         /// <summary>
261         /// Gets/Sets the unselected button foreground/icon visual
262         /// </summary>
263         public Tizen.NUI.PropertyMap UnselectedVisual
264         {
265             get
266             {
267                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
268                 GetProperty(Button.Property.UNSELECTED_VISUAL).Get(temp);
269                 return temp;
270             }
271             set
272             {
273                 SetProperty(Button.Property.UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
274             }
275         }
276
277         /// <summary>
278         /// Gets/Sets the selected button foreground/icon visual
279         /// </summary>
280         public Tizen.NUI.PropertyMap SelectedVisual
281         {
282             get
283             {
284                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
285                 GetProperty(Button.Property.SELECTED_VISUAL).Get(temp);
286                 return temp;
287             }
288             set
289             {
290                 SetProperty(Button.Property.SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
291             }
292         }
293
294         /// <summary>
295         /// Gets/Sets the disabled selected state foreground/icon button visual
296         /// </summary>
297         public Tizen.NUI.PropertyMap DisabledSelectedVisual
298         {
299             get
300             {
301                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
302                 GetProperty(Button.Property.DISABLED_SELECTED_VISUAL).Get(temp);
303                 return temp;
304             }
305             set
306             {
307                 SetProperty(Button.Property.DISABLED_SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
308             }
309         }
310
311         /// <summary>
312         /// Gets/Sets the disabled unselected state foreground/icon visual
313         /// </summary>
314         public Tizen.NUI.PropertyMap DisabledUnselectedVisual
315         {
316             get
317             {
318                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
319                 GetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL).Get(temp);
320                 return temp;
321             }
322             set
323             {
324                 SetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value));
325             }
326         }
327
328         /// <summary>
329         /// Gets/Sets the disabled in the unselected state background, button visual
330         /// </summary>
331         public Tizen.NUI.PropertyMap UnselectedBackgroundVisual
332         {
333             get
334             {
335                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
336                 GetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL).Get(temp);
337                 return temp;
338             }
339             set
340             {
341                 SetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
342             }
343         }
344
345         /// <summary>
346         /// Gets/Sets the selected background button visual
347         /// </summary>
348         public Tizen.NUI.PropertyMap SelectedBackgroundVisual
349         {
350             get
351             {
352                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
353                 GetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL).Get(temp);
354                 return temp;
355             }
356             set
357             {
358                 SetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
359             }
360         }
361
362         /// <summary>
363         /// Gets/Sets the disabled while unselected background button visual
364         /// </summary>
365         public Tizen.NUI.PropertyMap DisabledUnselectedBackgroundVisual
366         {
367             get
368             {
369                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
370                 GetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL).Get(temp);
371                 return temp;
372             }
373             set
374             {
375                 SetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
376             }
377         }
378
379         /// <summary>
380         /// Gets/Sets the disabled while selected background button visual
381         /// </summary>
382         public Tizen.NUI.PropertyMap DisabledSelectedBackgroundVisual
383         {
384             get
385             {
386                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
387                 GetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL).Get(temp);
388                 return temp;
389             }
390             set
391             {
392                 SetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value));
393             }
394         }
395
396         /// <summary>
397         /// Gets/Sets the position of the the label in relation to the foreground/icon if both present
398         /// </summary>
399         public Align LabelRelativeAlignment
400         {
401             get
402             {
403                 string temp;
404                 if (GetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT).Get(out temp) == false)
405                 {
406                     NUILog.Error("LabelRelativeAlignment get error!");
407                 }
408                 switch (temp)
409                 {
410                     case "BEGIN":
411                         return Align.Begin;
412                     case "END":
413                         return Align.End;
414                     case "TOP":
415                         return Align.Top;
416                     case "BOTTOM":
417                         return Align.Bottom;
418                     default:
419                         return Align.End;
420                 }
421             }
422             set
423             {
424                 string valueToString = "";
425                 switch (value)
426                 {
427                     case Align.Begin:
428                     {
429                         valueToString = "BEGIN";
430                         break;
431                     }
432                     case Align.End:
433                     {
434                         valueToString = "END";
435                         break;
436                     }
437                     case Align.Top:
438                     {
439                         valueToString = "TOP";
440                         break;
441                     }
442                     case Align.Bottom:
443                     {
444                         valueToString = "BOTTOM";
445                         break;
446                     }
447                     default:
448                     {
449                         valueToString = "END";
450                         break;
451                     }
452                 }
453                 SetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
454             }
455         }
456
457         /// <summary>
458         /// Gets/Sets the padding around the text
459         /// </summary>
460         public Vector4 LabelPadding
461         {
462             get
463             {
464                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
465                 GetProperty(Button.Property.LABEL_PADDING).Get(temp);
466                 return temp;
467             }
468             set
469             {
470                 SetProperty(Button.Property.LABEL_PADDING, new Tizen.NUI.PropertyValue(value));
471             }
472         }
473
474         /// <summary>
475         /// Gets/Sets the padding around the foreground visual
476         /// </summary>
477         public Vector4 ForegroundVisualPadding
478         {
479             get
480             {
481                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
482                 GetProperty(Button.Property.FOREGROUND_VISUAL_PADDING).Get(temp);
483                 return temp;
484             }
485             set
486             {
487                 SetProperty(Button.Property.FOREGROUND_VISUAL_PADDING, new Tizen.NUI.PropertyValue(value));
488             }
489         }
490
491         internal class Property
492         {
493             internal static readonly int UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_VISUAL_get();
494             internal static readonly int SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_VISUAL_get();
495             internal static readonly int DISABLED_SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_VISUAL_get();
496             internal static readonly int DISABLED_UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_VISUAL_get();
497             internal static readonly int UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_BACKGROUND_VISUAL_get();
498             internal static readonly int SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_BACKGROUND_VISUAL_get();
499             internal static readonly int DISABLED_UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_BACKGROUND_VISUAL_get();
500             internal static readonly int DISABLED_SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_BACKGROUND_VISUAL_get();
501             internal static readonly int LABEL_RELATIVE_ALIGNMENT = NDalicManualPINVOKE.Button_Property_LABEL_RELATIVE_ALIGNMENT_get();
502             internal static readonly int LABEL_PADDING = NDalicManualPINVOKE.Button_Property_LABEL_PADDING_get();
503             internal static readonly int FOREGROUND_VISUAL_PADDING = NDalicManualPINVOKE.Button_Property_VISUAL_PADDING_get();
504             internal static readonly int AUTO_REPEATING = NDalicPINVOKE.Button_Property_AUTO_REPEATING_get();
505             internal static readonly int INITIAL_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_INITIAL_AUTO_REPEATING_DELAY_get();
506             internal static readonly int NEXT_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_NEXT_AUTO_REPEATING_DELAY_get();
507             internal static readonly int TOGGLABLE = NDalicPINVOKE.Button_Property_TOGGLABLE_get();
508             internal static readonly int SELECTED = NDalicPINVOKE.Button_Property_SELECTED_get();
509             internal static readonly int UNSELECTED_COLOR = NDalicPINVOKE.Button_Property_UNSELECTED_COLOR_get();
510             internal static readonly int SELECTED_COLOR = NDalicPINVOKE.Button_Property_SELECTED_COLOR_get();
511             internal static readonly int LABEL = NDalicPINVOKE.Button_Property_LABEL_get();
512         }
513
514         /// <summary>
515         /// Creates an uninitialized Button.<br>
516         /// Only derived versions can be instantiated.<br>
517         /// </summary>
518         public Button() : this(NDalicPINVOKE.new_Button__SWIG_0(), true)
519         {
520             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
521         }
522
523         internal ButtonSignal PressedSignal()
524         {
525             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_PressedSignal(swigCPtr), false);
526             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
527             return ret;
528         }
529
530         internal ButtonSignal ReleasedSignal()
531         {
532             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ReleasedSignal(swigCPtr), false);
533             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
534             return ret;
535         }
536
537         internal ButtonSignal ClickedSignal()
538         {
539             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ClickedSignal(swigCPtr), false);
540             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
541             return ret;
542         }
543
544         internal ButtonSignal StateChangedSignal()
545         {
546             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_StateChangedSignal(swigCPtr), false);
547             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
548             return ret;
549         }
550
551         /// <summary>
552         /// If the autorepeating property is set to true then the togglable property is set to false.
553         /// </summary>
554         public bool AutoRepeating
555         {
556             get
557             {
558                 bool temp = false;
559                 GetProperty(Button.Property.AUTO_REPEATING).Get(out temp);
560                 return temp;
561             }
562             set
563             {
564                 SetProperty(Button.Property.AUTO_REPEATING, new Tizen.NUI.PropertyValue(value));
565             }
566         }
567
568         /// <summary>
569         /// By default this value is set to 0.15 seconds.
570         /// </summary>
571         public float InitialAutoRepeatingDelay
572         {
573             get
574             {
575                 float temp = 0.0f;
576                 GetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY).Get(out temp);
577                 return temp;
578             }
579             set
580             {
581                 SetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value));
582             }
583         }
584
585         /// <summary>
586         /// default this value is set to 0.05 seconds.
587         /// </summary>
588         public float NextAutoRepeatingDelay
589         {
590             get
591             {
592                 float temp = 0.0f;
593                 GetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY).Get(out temp);
594                 return temp;
595             }
596             set
597             {
598                 SetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value));
599             }
600         }
601
602         /// <summary>
603         /// If the togglable property is set to true, then the autorepeating property is set to false.
604         /// </summary>
605         public bool Togglable
606         {
607             get
608             {
609                 bool temp = false;
610                 GetProperty(Button.Property.TOGGLABLE).Get(out temp);
611                 return temp;
612             }
613             set
614             {
615                 SetProperty(Button.Property.TOGGLABLE, new Tizen.NUI.PropertyValue(value));
616             }
617         }
618
619         /// <summary>
620         /// /Gets/Sets the togglable button as either selected or unselected, togglable property must be set to true.
621         /// </summary>
622         public bool Selected
623         {
624             get
625             {
626                 bool temp = false;
627                 GetProperty(Button.Property.SELECTED).Get(out temp);
628                 return temp;
629             }
630             set
631             {
632                 SetProperty(Button.Property.SELECTED, new Tizen.NUI.PropertyValue(value));
633             }
634         }
635
636         /// <summary>
637         /// Gets/Sets unselected color.
638         /// </summary>
639         public Color UnselectedColor
640         {
641             get
642             {
643                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
644                 GetProperty(Button.Property.UNSELECTED_COLOR).Get(temp);
645                 return temp;
646             }
647             set
648             {
649                 SetProperty(Button.Property.UNSELECTED_COLOR, new Tizen.NUI.PropertyValue(value));
650             }
651         }
652
653         /// <summary>
654         /// Gets/Sets selected color.
655         /// </summary>
656         public Color SelectedColor
657         {
658             get
659             {
660                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
661                 GetProperty(Button.Property.SELECTED_COLOR).Get(temp);
662                 return temp;
663             }
664             set
665             {
666                 SetProperty(Button.Property.SELECTED_COLOR, new Tizen.NUI.PropertyValue(value));
667             }
668         }
669
670         /// <summary>
671         /// Gets/Sets label.
672         /// </summary>
673         public Tizen.NUI.PropertyMap Label
674         {
675             get
676             {
677                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
678                 GetProperty(Button.Property.LABEL).Get(temp);
679                 return temp;
680             }
681             set
682             {
683                 SetProperty(Button.Property.LABEL, new Tizen.NUI.PropertyValue(value));
684             }
685         }
686
687         /// <summary>
688         /// Gets/Sets text of label.
689         /// </summary>
690         public string LabelText
691         {
692             get
693             {
694                 Tizen.NUI.PropertyMap map = new Tizen.NUI.PropertyMap();
695                 GetProperty( Button.Property.LABEL).Get(map);
696                 Tizen.NUI.PropertyValue value = map.Find( TextVisualProperty.Text, "Text");
697                 string str;
698                 value.Get(out str);
699                 return str;
700             }
701             set
702             {
703                 SetProperty( Button.Property.LABEL, new Tizen.NUI.PropertyValue( value ) );
704             }
705         }
706
707         /// <summary>
708         /// Enumeration for describing the position the text label can be in relation to the control(and foreground/icon).
709         /// </summary>
710         public enum Align
711         {
712             /// <summary>
713             /// At the start of the control before the foreground/icon
714             /// </summary>
715             Begin,
716             /// <summary>
717             /// At the end of the control after the foreground/icon
718             /// </summary>
719             End,
720             /// <summary>
721             /// At the top of the control above the foreground/icon
722             /// </summary>
723             Top,
724             /// <summary>
725             /// At the bottom of the control below the foreground/icon
726             /// </summary>
727             Bottom
728         }
729
730     }
731
732 }