2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.ComponentModel;
19 using Tizen.NUI.BaseComponents;
20 using Tizen.NUI.Binding;
22 namespace Tizen.NUI.Components
25 /// Button is one kind of common component, a button clearly describes what action will occur when the user selects it.
26 /// Button may contain text or an icon.
28 /// <since_tizen> 6 </since_tizen>
29 public class Button : Control
31 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
32 [EditorBrowsable(EditorBrowsableState.Never)]
33 public static readonly BindableProperty IconRelativeOrientationProperty = BindableProperty.Create("IconRelativeOrientation", typeof(IconOrientation?), typeof(Tizen.NUI.Components.Button), null, propertyChanged: (bindable, oldValue, newValue) =>
35 var instance = (Tizen.NUI.Components.Button)bindable;
38 instance.privateIconRelativeOrientation = (IconOrientation?)newValue;
41 defaultValueCreator: (bindable) =>
43 var instance = (Tizen.NUI.Components.Button)bindable;
44 return instance.privateIconRelativeOrientation;
46 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
47 [EditorBrowsable(EditorBrowsableState.Never)]
48 public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create("IsEnabled", typeof(bool), typeof(Tizen.NUI.Components.Button), true, propertyChanged: (bindable, oldValue, newValue) =>
50 var instance = (Tizen.NUI.Components.Button)bindable;
53 instance.privateIsEnabled = (bool)newValue;
56 defaultValueCreator: (bindable) =>
58 var instance = (Tizen.NUI.Components.Button)bindable;
59 return instance.privateIsEnabled;
61 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
62 [EditorBrowsable(EditorBrowsableState.Never)]
63 public static readonly BindableProperty IsSelectedProperty = BindableProperty.Create("IsSelected", typeof(bool), typeof(Tizen.NUI.Components.Button), true, propertyChanged: (bindable, oldValue, newValue) =>
65 var instance = (Tizen.NUI.Components.Button)bindable;
68 instance.privateIsSelected = (bool)newValue;
71 defaultValueCreator: (bindable) =>
73 var instance = (Tizen.NUI.Components.Button)bindable;
74 return instance.privateIsSelected;
76 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
77 [EditorBrowsable(EditorBrowsableState.Never)]
78 public static readonly BindableProperty IsSelectableProperty = BindableProperty.Create("IsSelectable", typeof(bool), typeof(Tizen.NUI.Components.Button), true, propertyChanged: (bindable, oldValue, newValue) =>
80 var instance = (Tizen.NUI.Components.Button)bindable;
83 instance.privateIsSelectable = (bool)newValue;
86 defaultValueCreator: (bindable) =>
88 var instance = (Tizen.NUI.Components.Button)bindable;
89 return instance.privateIsSelectable;
92 private ImageView overlayImage;
94 private TextLabel buttonText;
95 private ImageView buttonIcon;
97 private EventHandler<StateChangedEventArgs> stateChangeHander;
99 private bool isSelected = false;
100 private bool isEnabled = true;
101 private bool isPressed = false;
104 /// Creates a new instance of a Button.
106 /// <since_tizen> 6 </since_tizen>
107 public Button() : base()
113 /// Creates a new instance of a Button with style.
115 /// <param name="style">Create Button by special style defined in UX.</param>
116 /// <since_tizen> 6 </since_tizen>
117 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
118 [EditorBrowsable(EditorBrowsableState.Never)]
119 public Button(string style) : base(style)
125 /// Creates a new instance of a Button with attributes.
127 /// <param name="controlStyle">Create Button by attributes customized by user.</param>
128 /// <since_tizen> 6 </since_tizen>
129 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
130 [EditorBrowsable(EditorBrowsableState.Never)]
131 public Button(ButtonStyle controlStyle) : base(controlStyle)
137 /// An event for the button clicked signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
139 /// <since_tizen> 6 </since_tizen>
140 public event EventHandler<ClickEventArgs> ClickEvent;
142 /// An event for the button state changed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
144 /// <since_tizen> 6 </since_tizen>
145 public event EventHandler<StateChangedEventArgs> StateChangedEvent
149 stateChangeHander += value;
153 stateChangeHander -= value;
157 /// Icon orientation.
159 /// <since_tizen> 6 </since_tizen>
160 public enum IconOrientation
165 /// <since_tizen> 6 </since_tizen>
170 /// <since_tizen> 6 </since_tizen>
175 /// <since_tizen> 6 </since_tizen>
180 /// <since_tizen> 6 </since_tizen>
184 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
185 [EditorBrowsable(EditorBrowsableState.Never)]
186 public new ButtonStyle Style => ViewStyle as ButtonStyle;
189 /// The text of Button.
191 /// <since_tizen> 6 </since_tizen>
196 return Style?.Text?.Text?.GetValue(ControlState);
200 if (null != Style?.Text)
202 Style.Text.Text = value;
208 /// Flag to decide Button can be selected or not.
210 /// <since_tizen> 6 </since_tizen>
211 public bool IsSelectable
215 return (bool)GetValue(IsSelectableProperty);
219 SetValue(IsSelectableProperty, value);
223 private bool privateIsSelectable
227 return Style?.IsSelectable ?? false;
231 Style.IsSelectable = value;
236 /// Translate text string in Button.
238 /// <since_tizen> 6 </since_tizen>
239 public string TranslatableText
243 return Style?.Text?.TranslatableText?.All;
247 if (null != Style?.Text)
249 Style.Text.TranslatableText = value;
255 /// Text point size in Button.
257 /// <since_tizen> 6 </since_tizen>
258 public float PointSize
262 return Style?.Text?.PointSize?.All ?? 0;
266 if (null != Style?.Text)
268 Style.Text.PointSize = value;
274 /// Text font family in Button.
276 /// <since_tizen> 6 </since_tizen>
277 public string FontFamily
281 return Style?.Text?.FontFamily.All;
285 if (null != Style?.Text)
287 Style.Text.FontFamily = value;
292 /// Text color in Button.
294 /// <since_tizen> 6 </since_tizen>
295 public Color TextColor
299 return Style?.Text?.TextColor?.All;
303 if (null != Style?.Text)
305 Style.Text.TextColor = value;
310 /// Text horizontal alignment in Button.
312 /// <since_tizen> 6 </since_tizen>
313 public HorizontalAlignment TextAlignment
317 return Style?.Text?.HorizontalAlignment ?? HorizontalAlignment.Center;
321 if (null != Style?.Text)
323 Style.Text.HorizontalAlignment = value;
328 /// Icon image's resource url in Button.
330 /// <since_tizen> 6 </since_tizen>
331 public string IconURL
335 return Style?.Icon?.ResourceUrl?.All;
339 if (null != Style?.Icon)
341 Style.Icon.ResourceUrl = value;
346 private StringSelector textSelector = new StringSelector();
348 /// Text string selector in Button.
350 /// <since_tizen> 6 </since_tizen>
351 public StringSelector TextSelector
359 textSelector.Clone(value);
363 private StringSelector translatableTextSelector = new StringSelector();
365 /// Translateable text string selector in Button.
367 /// <since_tizen> 6 </since_tizen>
368 public StringSelector TranslatableTextSelector
372 return translatableTextSelector;
376 translatableTextSelector.Clone(value);
380 private ColorSelector textColorSelector = new ColorSelector();
382 /// Text color selector in Button.
384 /// <since_tizen> 6 </since_tizen>
385 public ColorSelector TextColorSelector
389 return textColorSelector;
393 textColorSelector.Clone(value);
397 private FloatSelector pointSizeSelector = new FloatSelector();
399 /// Text font size selector in Button.
401 /// <since_tizen> 6 </since_tizen>
402 public FloatSelector PointSizeSelector
406 return pointSizeSelector;
410 pointSizeSelector.Clone(value);
414 private StringSelector iconURLSelector = new StringSelector();
416 /// Icon image's resource url selector in Button.
418 /// <since_tizen> 6 </since_tizen>
419 public StringSelector IconURLSelector
423 return iconURLSelector;
427 iconURLSelector.Clone(value);
432 /// Flag to decide selected state in Button.
434 /// <since_tizen> 6 </since_tizen>
435 public bool IsSelected
439 return (bool)GetValue(IsSelectedProperty);
443 SetValue(IsSelectedProperty, value);
446 private bool privateIsSelected
459 /// Flag to decide enable or disable in Button.
461 /// <since_tizen> 6 </since_tizen>
462 public bool IsEnabled
466 return (bool)GetValue(IsEnabledProperty);
470 SetValue(IsEnabledProperty, value);
473 private bool privateIsEnabled
487 /// Icon relative orientation in Button, work only when show icon and text.
489 /// <since_tizen> 6 </since_tizen>
490 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
491 [EditorBrowsable(EditorBrowsableState.Never)]
492 public IconOrientation? IconRelativeOrientation
496 return (IconOrientation?)GetValue(IconRelativeOrientationProperty);
500 SetValue(IconRelativeOrientationProperty, value);
503 private IconOrientation? privateIconRelativeOrientation
507 return Style?.IconRelativeOrientation;
511 if(Style != null && Style.IconRelativeOrientation != value)
513 Style.IconRelativeOrientation = value;
520 /// Icon padding in Button, work only when show icon and text.
522 /// <since_tizen> 6 </since_tizen>
523 public Extents IconPadding
527 return Style?.Icon?.Padding;
531 if (null != value && null != Style?.Icon?.Padding)
533 Style.Icon.Padding.CopyFrom(value);
539 /// Text padding in Button, work only when show icon and text.
541 /// <since_tizen> 6 </since_tizen>
542 public Extents TextPadding
546 return Style?.Text?.Padding;
550 if (null != value && null != Style?.Text?.Padding)
552 Style.Text.Padding.CopyFrom(value);
558 /// Dispose Button and all children on it.
560 /// <param name="type">Dispose type.</param>
561 /// <since_tizen> 6 </since_tizen>
562 protected override void Dispose(DisposeTypes type)
569 if (type == DisposeTypes.Explicit)
571 if (buttonIcon != null)
573 buttonIcon.Relayout -= OnIconRelayout;
574 Utility.Dispose(buttonIcon);
576 if (buttonText != null)
578 Utility.Dispose(buttonText);
580 if (overlayImage != null)
582 Utility.Dispose(overlayImage);
589 /// Called after a key event is received by the view that has had its focus set.
591 /// <param name="key">The key event.</param>
592 /// <returns>True if the key event should be consumed.</returns>
593 /// <since_tizen> 6 </since_tizen>
594 public override bool OnKey(Key key)
596 if (key.State == Key.StateType.Down)
598 if (key.KeyPressedName == "Return")
604 ClickEventArgs eventArgs = new ClickEventArgs();
609 else if (key.State == Key.StateType.Up)
611 if (key.KeyPressedName == "Return")
614 if (Style.IsSelectable != null && Style.IsSelectable == true)
616 isSelected = !isSelected;
621 return base.OnKey(key);
625 /// Called when the control gain key input focus. Should be overridden by derived classes if they need to customize what happens when the focus is gained.
627 /// <since_tizen> 6 </since_tizen>
628 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
629 [EditorBrowsable(EditorBrowsableState.Never)]
630 public override void OnFocusGained()
632 base.OnFocusGained();
636 /// Called when the control loses key input focus. Should be overridden by derived classes if they need to customize what happens when the focus is lost.
638 /// <since_tizen> 6 </since_tizen>
639 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
640 [EditorBrowsable(EditorBrowsableState.Never)]
641 public override void OnFocusLost()
648 /// Tap gesture event callback.
650 /// <param name="source">Source which recieved touch event.</param>
651 /// <param name="e">Tap gesture event argument.</param>
652 /// <since_tizen> 6 </since_tizen>
653 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
654 [EditorBrowsable(EditorBrowsableState.Never)]
655 protected override void OnTapGestureDetected(object source, TapGestureDetector.DetectedEventArgs e)
659 ClickEventArgs eventArgs = new ClickEventArgs();
661 base.OnTapGestureDetected(source, e);
665 /// Called after a touch event is received by the owning view.<br />
666 /// CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).<br />
668 /// <param name="touch">The touch event.</param>
669 /// <returns>True if the event should be consumed.</returns>
670 /// <since_tizen> 6 </since_tizen>
671 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
672 [EditorBrowsable(EditorBrowsableState.Never)]
673 public override bool OnTouch(Touch touch)
675 PointStateType state = touch.GetState(0);
679 case PointStateType.Down:
683 case PointStateType.Interrupted:
687 case PointStateType.Up:
689 if (Style.IsSelectable != null && Style.IsSelectable == true)
691 isSelected = !isSelected;
698 return base.OnTouch(touch);
701 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
702 [EditorBrowsable(EditorBrowsableState.Never)]
703 public override void ApplyStyle(ViewStyle viewStyle)
705 base.ApplyStyle(viewStyle);
707 ButtonStyle buttonStyle = viewStyle as ButtonStyle;
709 if (null != buttonStyle)
711 if (null == overlayImage)
713 overlayImage = new ImageView()
715 WidthResizePolicy = ResizePolicyType.FillToParent,
716 HeightResizePolicy = ResizePolicyType.FillToParent
718 this.Add(overlayImage);
721 if (null == buttonText)
723 buttonText = new TextLabel();
724 this.Add(buttonText);
727 if (null == buttonIcon)
729 buttonIcon = new ImageView();
730 buttonIcon.Relayout += OnIconRelayout;
731 this.Add(buttonIcon);
734 overlayImage.ApplyStyle(buttonStyle.Overlay);
735 buttonText.ApplyStyle(buttonStyle.Text);
736 buttonIcon.ApplyStyle(buttonStyle.Icon);
741 /// Get Button attribues.
743 /// <since_tizen> 6 </since_tizen>
744 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
745 [EditorBrowsable(EditorBrowsableState.Never)]
746 protected override ViewStyle GetViewStyle()
748 return new ButtonStyle();
752 /// Update Button State.
754 /// <since_tizen> 6 </since_tizen>
755 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
756 [EditorBrowsable(EditorBrowsableState.Never)]
757 protected void UpdateState()
759 ControlStates sourceState = ControlState;
760 ControlStates targetState;
764 targetState = isPressed ? ControlStates.Pressed : (IsFocused ? (IsSelected ? ControlStates.SelectedFocused : ControlStates.Focused) : (IsSelected ? ControlStates.Selected : ControlStates.Normal));
768 targetState = IsSelected ? ControlStates.DisabledSelected : (IsFocused ? ControlStates.DisabledFocused : ControlStates.Disabled);
771 if(sourceState != targetState)
773 ControlState = targetState;
777 StateChangedEventArgs e = new StateChangedEventArgs
779 PreviousState = sourceState,
780 CurrentState = targetState
782 stateChangeHander?.Invoke(this, e);
787 /// It is hijack by using protected, attributes copy problem when class inherited from Button.
789 /// <since_tizen> 6 </since_tizen>
790 private void Initialize()
793 LayoutDirectionChanged += OnLayoutDirectionChanged;
797 /// Measure text, it can be override.
799 /// <since_tizen> 6 </since_tizen>
800 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
801 [EditorBrowsable(EditorBrowsableState.Never)]
802 protected virtual void MeasureText()
804 if (Style.IconRelativeOrientation == null || buttonIcon == null || buttonText == null)
808 buttonText.WidthResizePolicy = ResizePolicyType.Fixed;
809 buttonText.HeightResizePolicy = ResizePolicyType.Fixed;
810 int textPaddingStart = Style.Text.Padding.Start;
811 int textPaddingEnd = Style.Text.Padding.End;
812 int textPaddingTop = Style.Text.Padding.Top;
813 int textPaddingBottom = Style.Text.Padding.Bottom;
815 int iconPaddingStart = Style.Icon.Padding.Start;
816 int iconPaddingEnd = Style.Icon.Padding.End;
817 int iconPaddingTop = Style.Icon.Padding.Top;
818 int iconPaddingBottom = Style.Icon.Padding.Bottom;
820 if (IconRelativeOrientation == IconOrientation.Top || IconRelativeOrientation == IconOrientation.Bottom)
822 buttonText.SizeWidth = SizeWidth - textPaddingStart - textPaddingEnd;
823 buttonText.SizeHeight = SizeHeight - textPaddingTop - textPaddingBottom - iconPaddingTop - iconPaddingBottom - buttonIcon.SizeHeight;
827 buttonText.SizeWidth = SizeWidth - textPaddingStart - textPaddingEnd - iconPaddingStart - iconPaddingEnd - buttonIcon.SizeWidth;
828 buttonText.SizeHeight = SizeHeight - textPaddingTop - textPaddingBottom;
832 /// Layout child, it can be override.
834 /// <since_tizen> 6 </since_tizen>
835 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
836 [EditorBrowsable(EditorBrowsableState.Never)]
837 protected virtual void LayoutChild()
839 if (Style.IconRelativeOrientation == null || buttonIcon == null || buttonText == null)
844 int textPaddingStart = Style.Text.Padding.Start;
845 int textPaddingEnd = Style.Text.Padding.End;
846 int textPaddingTop = Style.Text.Padding.Top;
847 int textPaddingBottom = Style.Text.Padding.Bottom;
849 int iconPaddingStart = Style.Icon.Padding.Start;
850 int iconPaddingEnd = Style.Icon.Padding.End;
851 int iconPaddingTop = Style.Icon.Padding.Top;
852 int iconPaddingBottom = Style.Icon.Padding.Bottom;
854 switch (IconRelativeOrientation)
856 case IconOrientation.Top:
857 buttonIcon.PositionUsesPivotPoint = true;
858 buttonIcon.ParentOrigin = NUI.ParentOrigin.TopCenter;
859 buttonIcon.PivotPoint = NUI.PivotPoint.TopCenter;
860 buttonIcon.Position2D = new Position2D(0, iconPaddingTop);
862 buttonText.PositionUsesPivotPoint = true;
863 buttonText.ParentOrigin = NUI.ParentOrigin.BottomCenter;
864 buttonText.PivotPoint = NUI.PivotPoint.BottomCenter;
865 buttonText.Position2D = new Position2D(0, -textPaddingBottom);
867 case IconOrientation.Bottom:
868 buttonIcon.PositionUsesPivotPoint = true;
869 buttonIcon.ParentOrigin = NUI.ParentOrigin.BottomCenter;
870 buttonIcon.PivotPoint = NUI.PivotPoint.BottomCenter;
871 buttonIcon.Position2D = new Position2D(0, -iconPaddingBottom);
873 buttonText.PositionUsesPivotPoint = true;
874 buttonText.ParentOrigin = NUI.ParentOrigin.TopCenter;
875 buttonText.PivotPoint = NUI.PivotPoint.TopCenter;
876 buttonText.Position2D = new Position2D(0, textPaddingTop);
878 case IconOrientation.Left:
879 if (LayoutDirection == ViewLayoutDirectionType.LTR)
881 buttonIcon.PositionUsesPivotPoint = true;
882 buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterLeft;
883 buttonIcon.PivotPoint = NUI.PivotPoint.CenterLeft;
884 buttonIcon.Position2D = new Position2D(iconPaddingStart, 0);
886 buttonText.PositionUsesPivotPoint = true;
887 buttonText.ParentOrigin = NUI.ParentOrigin.CenterRight;
888 buttonText.PivotPoint = NUI.PivotPoint.CenterRight;
889 buttonText.Position2D = new Position2D(-textPaddingEnd, 0);
893 buttonIcon.PositionUsesPivotPoint = true;
894 buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterRight;
895 buttonIcon.PivotPoint = NUI.PivotPoint.CenterRight;
896 buttonIcon.Position2D = new Position2D(-iconPaddingStart, 0);
898 buttonText.PositionUsesPivotPoint = true;
899 buttonText.ParentOrigin = NUI.ParentOrigin.CenterLeft;
900 buttonText.PivotPoint = NUI.PivotPoint.CenterLeft;
901 buttonText.Position2D = new Position2D(textPaddingEnd, 0);
905 case IconOrientation.Right:
906 if (LayoutDirection == ViewLayoutDirectionType.RTL)
908 buttonIcon.PositionUsesPivotPoint = true;
909 buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterLeft;
910 buttonIcon.PivotPoint = NUI.PivotPoint.CenterLeft;
911 buttonIcon.Position2D = new Position2D(iconPaddingEnd, 0);
913 buttonText.PositionUsesPivotPoint = true;
914 buttonText.ParentOrigin = NUI.ParentOrigin.CenterRight;
915 buttonText.PivotPoint = NUI.PivotPoint.CenterRight;
916 buttonText.Position2D = new Position2D(-textPaddingStart, 0);
920 buttonIcon.PositionUsesPivotPoint = true;
921 buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterRight;
922 buttonIcon.PivotPoint = NUI.PivotPoint.CenterRight;
923 buttonIcon.Position2D = new Position2D(-iconPaddingEnd, 0);
925 buttonText.PositionUsesPivotPoint = true;
926 buttonText.ParentOrigin = NUI.ParentOrigin.CenterLeft;
927 buttonText.PivotPoint = NUI.PivotPoint.CenterLeft;
928 buttonText.Position2D = new Position2D(textPaddingStart, 0);
936 /// Theme change callback when theme is changed, this callback will be trigger.
938 /// <since_tizen> 6 </since_tizen>
939 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
940 [EditorBrowsable(EditorBrowsableState.Never)]
941 protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
943 ButtonStyle tempAttributes = StyleManager.Instance.GetAttributes(style) as ButtonStyle;
944 if (tempAttributes != null)
946 Style.CopyFrom(tempAttributes);
951 private void UpdateUIContent()
956 Sensitive = isEnabled;
959 private void OnLayoutDirectionChanged(object sender, LayoutDirectionChangedEventArgs e)
965 private void OnClick(ClickEventArgs eventArgs)
967 ClickEvent?.Invoke(this, eventArgs);
970 private void OnIconRelayout(object sender, EventArgs e)
977 /// ClickEventArgs is a class to record button click event arguments which will sent to user.
979 /// <since_tizen> 6 </since_tizen>
980 public class ClickEventArgs : EventArgs
984 /// StateChangeEventArgs is a class to record button state change event arguments which will sent to user.
986 /// <since_tizen> 6 </since_tizen>
987 public class StateChangedEventArgs : EventArgs
989 /// <summary> previous state of Button </summary>
990 /// <since_tizen> 6 </since_tizen>
991 public ControlStates PreviousState;
992 /// <summary> current state of Button </summary>
993 /// <since_tizen> 6 </since_tizen>
994 public ControlStates CurrentState;