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 Style.Text.Text = value;
205 /// Flag to decide Button can be selected or not.
207 /// <since_tizen> 6 </since_tizen>
208 public bool IsSelectable
212 return (bool)GetValue(IsSelectableProperty);
216 SetValue(IsSelectableProperty, value);
220 private bool privateIsSelectable
224 return Style?.IsSelectable ?? false;
228 Style.IsSelectable = value;
233 /// Translate text string in Button.
235 /// <since_tizen> 6 </since_tizen>
236 public string TranslatableText
240 return Style?.Text?.TranslatableText?.All;
246 if (Style.Text.TranslatableText == null)
248 Style.Text.TranslatableText = new Selector<string>();
250 Style.Text.TranslatableText.All = value;
256 /// Text point size in Button.
258 /// <since_tizen> 6 </since_tizen>
259 public float PointSize
263 return Style?.Text?.PointSize?.All ?? 0;
267 if (Style.Text.PointSize == null)
269 Style.Text.PointSize = new Selector<float?>();
271 Style.Text.PointSize.All = value;
276 /// Text font family in Button.
278 /// <since_tizen> 6 </since_tizen>
279 public string FontFamily
283 return Style?.Text?.FontFamily.All;
287 Style.Text.FontFamily = value;
291 /// Text color in Button.
293 /// <since_tizen> 6 </since_tizen>
294 public Color TextColor
298 return Style?.Text?.TextColor?.All;
302 if (Style.Text.TextColor == null)
304 Style.Text.TextColor = new Selector<Color>();
306 Style.Text.TextColor.All = 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 Style.Text.HorizontalAlignment = value;
325 /// Icon image's resource url in Button.
327 /// <since_tizen> 6 </since_tizen>
328 public string IconURL
332 return Style?.Icon?.ResourceUrl?.All;
338 if (Style.Icon.ResourceUrl == null)
340 Style.Icon.ResourceUrl = new Selector<string>();
342 Style.Icon.ResourceUrl.All = value;
347 /// Text string selector in Button.
349 /// <since_tizen> 6 </since_tizen>
350 public StringSelector TextSelector
354 return (StringSelector)Style?.Text?.Text;
360 Style.Text.Text = value.Clone() as StringSelector;
365 /// Translateable text string selector in Button.
367 /// <since_tizen> 6 </since_tizen>
368 public StringSelector TranslatableTextSelector
372 return (StringSelector)Style?.Text?.TranslatableText;
378 Style.Text.TranslatableText = value.Clone() as StringSelector;
384 /// Text color selector in Button.
386 /// <since_tizen> 6 </since_tizen>
387 public ColorSelector TextColorSelector
391 return (ColorSelector)Style?.Text?.TextColor;
397 Style.Text.TextColor = value.Clone() as ColorSelector;
403 /// Text font size selector in Button.
405 /// <since_tizen> 6 </since_tizen>
406 public FloatSelector PointSizeSelector
410 return (FloatSelector)Style?.Text?.PointSize;
416 Style.Text.PointSize = value.Clone() as FloatSelector;
422 /// Icon image's resource url selector in Button.
424 /// <since_tizen> 6 </since_tizen>
425 public StringSelector IconURLSelector
429 return (StringSelector)Style?.Icon?.ResourceUrl;
435 Style.Icon.ResourceUrl = value.Clone() as StringSelector;
441 /// Flag to decide selected state in Button.
443 /// <since_tizen> 6 </since_tizen>
444 public bool IsSelected
448 return (bool)GetValue(IsSelectedProperty);
452 SetValue(IsSelectedProperty, value);
455 private bool privateIsSelected
468 /// Flag to decide enable or disable in Button.
470 /// <since_tizen> 6 </since_tizen>
471 public bool IsEnabled
475 return (bool)GetValue(IsEnabledProperty);
479 SetValue(IsEnabledProperty, value);
482 private bool privateIsEnabled
496 /// Icon relative orientation in Button, work only when show icon and text.
498 /// <since_tizen> 6 </since_tizen>
499 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
500 [EditorBrowsable(EditorBrowsableState.Never)]
501 public IconOrientation? IconRelativeOrientation
505 return (IconOrientation?)GetValue(IconRelativeOrientationProperty);
509 SetValue(IconRelativeOrientationProperty, value);
512 private IconOrientation? privateIconRelativeOrientation
516 return Style?.IconRelativeOrientation;
520 if(Style != null && Style.IconRelativeOrientation != value)
522 Style.IconRelativeOrientation = value;
529 /// Icon padding in Button, work only when show icon and text.
531 /// <since_tizen> 6 </since_tizen>
532 public Extents IconPadding
536 return Style.Icon.Padding;
542 Style.Icon.Padding.CopyFrom(value);
548 /// Text padding in Button, work only when show icon and text.
550 /// <since_tizen> 6 </since_tizen>
551 public Extents TextPadding
555 return Style.Text.Padding;
561 Style.Text.Padding.CopyFrom(value);
567 /// Dispose Button and all children on it.
569 /// <param name="type">Dispose type.</param>
570 /// <since_tizen> 6 </since_tizen>
571 protected override void Dispose(DisposeTypes type)
578 if (type == DisposeTypes.Explicit)
580 if (buttonIcon != null)
582 buttonIcon.Relayout -= OnIconRelayout;
583 Utility.Dispose(buttonIcon);
585 if (buttonText != null)
587 Utility.Dispose(buttonText);
589 if (overlayImage != null)
591 Utility.Dispose(overlayImage);
598 /// Called after a key event is received by the view that has had its focus set.
600 /// <param name="key">The key event.</param>
601 /// <returns>True if the key event should be consumed.</returns>
602 /// <since_tizen> 6 </since_tizen>
603 public override bool OnKey(Key key)
605 if (key.State == Key.StateType.Down)
607 if (key.KeyPressedName == "Return")
613 ClickEventArgs eventArgs = new ClickEventArgs();
618 else if (key.State == Key.StateType.Up)
620 if (key.KeyPressedName == "Return")
623 if (Style.IsSelectable != null && Style.IsSelectable == true)
625 isSelected = !isSelected;
630 return base.OnKey(key);
634 /// 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.
636 /// <since_tizen> 6 </since_tizen>
637 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
638 [EditorBrowsable(EditorBrowsableState.Never)]
639 public override void OnFocusGained()
641 base.OnFocusGained();
645 /// 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.
647 /// <since_tizen> 6 </since_tizen>
648 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
649 [EditorBrowsable(EditorBrowsableState.Never)]
650 public override void OnFocusLost()
657 /// Tap gesture event callback.
659 /// <param name="source">Source which recieved touch event.</param>
660 /// <param name="e">Tap gesture event argument.</param>
661 /// <since_tizen> 6 </since_tizen>
662 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
663 [EditorBrowsable(EditorBrowsableState.Never)]
664 protected override void OnTapGestureDetected(object source, TapGestureDetector.DetectedEventArgs e)
668 ClickEventArgs eventArgs = new ClickEventArgs();
670 base.OnTapGestureDetected(source, e);
674 /// Called after a touch event is received by the owning view.<br />
675 /// CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).<br />
677 /// <param name="touch">The touch event.</param>
678 /// <returns>True if the event should be consumed.</returns>
679 /// <since_tizen> 6 </since_tizen>
680 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
681 [EditorBrowsable(EditorBrowsableState.Never)]
682 public override bool OnTouch(Touch touch)
684 PointStateType state = touch.GetState(0);
688 case PointStateType.Down:
692 case PointStateType.Interrupted:
696 case PointStateType.Up:
698 if (Style.IsSelectable != null && Style.IsSelectable == true)
700 isSelected = !isSelected;
707 return base.OnTouch(touch);
710 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
711 [EditorBrowsable(EditorBrowsableState.Never)]
712 public override void ApplyStyle(ViewStyle viewStyle)
714 base.ApplyStyle(viewStyle);
716 ButtonStyle buttonStyle = viewStyle as ButtonStyle;
718 if (null != buttonStyle)
720 if (null == overlayImage)
722 overlayImage = new ImageView()
724 WidthResizePolicy = ResizePolicyType.FillToParent,
725 HeightResizePolicy = ResizePolicyType.FillToParent
727 this.Add(overlayImage);
730 if (null == buttonText)
732 buttonText = new TextLabel();
733 this.Add(buttonText);
736 if (null == buttonIcon)
738 buttonIcon = new ImageView();
739 buttonIcon.Relayout += OnIconRelayout;
740 this.Add(buttonIcon);
743 overlayImage.ApplyStyle(buttonStyle.Overlay);
744 buttonText.ApplyStyle(buttonStyle.Text);
745 buttonIcon.ApplyStyle(buttonStyle.Icon);
750 /// Get Button attribues.
752 /// <since_tizen> 6 </since_tizen>
753 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
754 [EditorBrowsable(EditorBrowsableState.Never)]
755 protected override ViewStyle GetViewStyle()
757 return new ButtonStyle();
761 /// Update Button State.
763 /// <since_tizen> 6 </since_tizen>
764 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
765 [EditorBrowsable(EditorBrowsableState.Never)]
766 protected void UpdateState()
768 ControlStates sourceState = ControlState;
769 ControlStates targetState;
773 targetState = isPressed ? ControlStates.Pressed : (IsFocused ? (IsSelected ? ControlStates.SelectedFocused : ControlStates.Focused) : (IsSelected ? ControlStates.Selected : ControlStates.Normal));
777 targetState = IsSelected ? ControlStates.DisabledSelected : (IsFocused ? ControlStates.DisabledFocused : ControlStates.Disabled);
780 if(sourceState != targetState)
782 ControlState = targetState;
786 StateChangedEventArgs e = new StateChangedEventArgs
788 PreviousState = sourceState,
789 CurrentState = targetState
791 stateChangeHander?.Invoke(this, e);
796 /// It is hijack by using protected, attributes copy problem when class inherited from Button.
798 /// <since_tizen> 6 </since_tizen>
799 private void Initialize()
802 LayoutDirectionChanged += OnLayoutDirectionChanged;
806 /// Measure text, it can be override.
808 /// <since_tizen> 6 </since_tizen>
809 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
810 [EditorBrowsable(EditorBrowsableState.Never)]
811 protected virtual void MeasureText()
813 if (Style.IconRelativeOrientation == null || buttonIcon == null || buttonText == null)
817 buttonText.WidthResizePolicy = ResizePolicyType.Fixed;
818 buttonText.HeightResizePolicy = ResizePolicyType.Fixed;
819 int textPaddingStart = Style.Text.Padding.Start;
820 int textPaddingEnd = Style.Text.Padding.End;
821 int textPaddingTop = Style.Text.Padding.Top;
822 int textPaddingBottom = Style.Text.Padding.Bottom;
824 int iconPaddingStart = Style.Icon.Padding.Start;
825 int iconPaddingEnd = Style.Icon.Padding.End;
826 int iconPaddingTop = Style.Icon.Padding.Top;
827 int iconPaddingBottom = Style.Icon.Padding.Bottom;
829 if (IconRelativeOrientation == IconOrientation.Top || IconRelativeOrientation == IconOrientation.Bottom)
831 buttonText.SizeWidth = SizeWidth - textPaddingStart - textPaddingEnd;
832 buttonText.SizeHeight = SizeHeight - textPaddingTop - textPaddingBottom - iconPaddingTop - iconPaddingBottom - buttonIcon.SizeHeight;
836 buttonText.SizeWidth = SizeWidth - textPaddingStart - textPaddingEnd - iconPaddingStart - iconPaddingEnd - buttonIcon.SizeWidth;
837 buttonText.SizeHeight = SizeHeight - textPaddingTop - textPaddingBottom;
841 /// Layout child, it can be override.
843 /// <since_tizen> 6 </since_tizen>
844 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
845 [EditorBrowsable(EditorBrowsableState.Never)]
846 protected virtual void LayoutChild()
848 if (Style.IconRelativeOrientation == null || buttonIcon == null || buttonText == null)
853 int textPaddingStart = Style.Text.Padding.Start;
854 int textPaddingEnd = Style.Text.Padding.End;
855 int textPaddingTop = Style.Text.Padding.Top;
856 int textPaddingBottom = Style.Text.Padding.Bottom;
858 int iconPaddingStart = Style.Icon.Padding.Start;
859 int iconPaddingEnd = Style.Icon.Padding.End;
860 int iconPaddingTop = Style.Icon.Padding.Top;
861 int iconPaddingBottom = Style.Icon.Padding.Bottom;
863 switch (IconRelativeOrientation)
865 case IconOrientation.Top:
866 buttonIcon.PositionUsesPivotPoint = true;
867 buttonIcon.ParentOrigin = NUI.ParentOrigin.TopCenter;
868 buttonIcon.PivotPoint = NUI.PivotPoint.TopCenter;
869 buttonIcon.Position2D = new Position2D(0, iconPaddingTop);
871 buttonText.PositionUsesPivotPoint = true;
872 buttonText.ParentOrigin = NUI.ParentOrigin.BottomCenter;
873 buttonText.PivotPoint = NUI.PivotPoint.BottomCenter;
874 buttonText.Position2D = new Position2D(0, -textPaddingBottom);
876 case IconOrientation.Bottom:
877 buttonIcon.PositionUsesPivotPoint = true;
878 buttonIcon.ParentOrigin = NUI.ParentOrigin.BottomCenter;
879 buttonIcon.PivotPoint = NUI.PivotPoint.BottomCenter;
880 buttonIcon.Position2D = new Position2D(0, -iconPaddingBottom);
882 buttonText.PositionUsesPivotPoint = true;
883 buttonText.ParentOrigin = NUI.ParentOrigin.TopCenter;
884 buttonText.PivotPoint = NUI.PivotPoint.TopCenter;
885 buttonText.Position2D = new Position2D(0, textPaddingTop);
887 case IconOrientation.Left:
888 if (LayoutDirection == ViewLayoutDirectionType.LTR)
890 buttonIcon.PositionUsesPivotPoint = true;
891 buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterLeft;
892 buttonIcon.PivotPoint = NUI.PivotPoint.CenterLeft;
893 buttonIcon.Position2D = new Position2D(iconPaddingStart, 0);
895 buttonText.PositionUsesPivotPoint = true;
896 buttonText.ParentOrigin = NUI.ParentOrigin.CenterRight;
897 buttonText.PivotPoint = NUI.PivotPoint.CenterRight;
898 buttonText.Position2D = new Position2D(-textPaddingEnd, 0);
902 buttonIcon.PositionUsesPivotPoint = true;
903 buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterRight;
904 buttonIcon.PivotPoint = NUI.PivotPoint.CenterRight;
905 buttonIcon.Position2D = new Position2D(-iconPaddingStart, 0);
907 buttonText.PositionUsesPivotPoint = true;
908 buttonText.ParentOrigin = NUI.ParentOrigin.CenterLeft;
909 buttonText.PivotPoint = NUI.PivotPoint.CenterLeft;
910 buttonText.Position2D = new Position2D(textPaddingEnd, 0);
914 case IconOrientation.Right:
915 if (LayoutDirection == ViewLayoutDirectionType.RTL)
917 buttonIcon.PositionUsesPivotPoint = true;
918 buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterLeft;
919 buttonIcon.PivotPoint = NUI.PivotPoint.CenterLeft;
920 buttonIcon.Position2D = new Position2D(iconPaddingEnd, 0);
922 buttonText.PositionUsesPivotPoint = true;
923 buttonText.ParentOrigin = NUI.ParentOrigin.CenterRight;
924 buttonText.PivotPoint = NUI.PivotPoint.CenterRight;
925 buttonText.Position2D = new Position2D(-textPaddingStart, 0);
929 buttonIcon.PositionUsesPivotPoint = true;
930 buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterRight;
931 buttonIcon.PivotPoint = NUI.PivotPoint.CenterRight;
932 buttonIcon.Position2D = new Position2D(-iconPaddingEnd, 0);
934 buttonText.PositionUsesPivotPoint = true;
935 buttonText.ParentOrigin = NUI.ParentOrigin.CenterLeft;
936 buttonText.PivotPoint = NUI.PivotPoint.CenterLeft;
937 buttonText.Position2D = new Position2D(textPaddingStart, 0);
945 /// Theme change callback when theme is changed, this callback will be trigger.
947 /// <since_tizen> 6 </since_tizen>
948 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
949 [EditorBrowsable(EditorBrowsableState.Never)]
950 protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
952 ButtonStyle tempAttributes = StyleManager.Instance.GetAttributes(style) as ButtonStyle;
953 if (tempAttributes != null)
955 Style.CopyFrom(tempAttributes);
960 private void UpdateUIContent()
965 Sensitive = isEnabled;
968 private void OnLayoutDirectionChanged(object sender, LayoutDirectionChangedEventArgs e)
974 private void OnClick(ClickEventArgs eventArgs)
976 ClickEvent?.Invoke(this, eventArgs);
979 private void OnIconRelayout(object sender, EventArgs e)
986 /// ClickEventArgs is a class to record button click event arguments which will sent to user.
988 /// <since_tizen> 6 </since_tizen>
989 public class ClickEventArgs : EventArgs
993 /// StateChangeEventArgs is a class to record button state change event arguments which will sent to user.
995 /// <since_tizen> 6 </since_tizen>
996 public class StateChangedEventArgs : EventArgs
998 /// <summary> previous state of Button </summary>
999 /// <since_tizen> 6 </since_tizen>
1000 public ControlStates PreviousState;
1001 /// <summary> current state of Button </summary>
1002 /// <since_tizen> 6 </since_tizen>
1003 public ControlStates CurrentState;