/// An event for the button state changed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
/// </summary>
/// <since_tizen> 6 </since_tizen>
+ [Obsolete("Deprecated in API8; Will be removed in API10. Please use View.ControlStateChangedEvent")]
public event EventHandler<StateChangedEventArgs> StateChangedEvent
{
add
{
- stateChangeHander += value;
+ stateChangeHandler += value;
}
remove
{
- stateChangeHander -= value;
+ stateChangeHandler -= value;
}
}
/// <summary>
/// Button's icon part.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 8 </since_tizen>
public ImageView Icon
{
get
/// <summary>
/// Button's overlay image part.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 8 </since_tizen>
public ImageView OverlayImage
{
get
/// <summary>
/// Button's text part.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 8 </since_tizen>
public TextLabel TextLabel
{
get
/// <summary>
/// Icon relative orientation in Button, work only when show icon and text.
/// </summary>
- /// <since_tizen> 6 </since_tizen>
- /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 8 </since_tizen>
public IconOrientation? IconRelativeOrientation
{
get
/// <since_tizen> 6 </since_tizen>
public override bool OnKey(Key key)
{
- if (null == key) return false;
+ if (!IsEnabled || null == key)
+ {
+ return false;
+ }
+
if (key.State == Key.StateType.Down)
{
if (key.KeyPressedName == "Return")
/// <summary>
/// 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.
/// </summary>
- /// <since_tizen> 6 </since_tizen>
- /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 8 </since_tizen>
public override void OnFocusGained()
{
base.OnFocusGained();
/// <summary>
/// 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.
/// </summary>
- /// <since_tizen> 6 </since_tizen>
- /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 8 </since_tizen>
public override void OnFocusLost()
{
base.OnFocusLost();
/// </summary>
/// <param name="touch">The touch event.</param>
/// <returns>True if the event should be consumed.</returns>
- /// <since_tizen> 6 </since_tizen>
- /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 8 </since_tizen>
public override bool OnTouch(Touch touch)
{
- if (null == touch) return false;
+ if (!IsEnabled || null == touch)
+ {
+ return false;
+ }
+
PointStateType state = touch.GetState(0);
switch (state)
/// StateChangeEventArgs is a class to record button state change event arguments which will sent to user.
/// </summary>
/// <since_tizen> 6 </since_tizen>
+ [Obsolete("Deprecated in API8; Will be removed in API10. Please use View.ControlStateChangedEventArgs")]
public class StateChangedEventArgs : EventArgs
{
/// <summary> previous state of Button </summary>
/// <since_tizen> 6 </since_tizen>
+ [Obsolete("Deprecated in API8; Will be removed in API10")]
public ControlStates PreviousState;
/// <summary> current state of Button </summary>
/// <since_tizen> 6 </since_tizen>
+ [Obsolete("Deprecated in API8; Will be removed in API10")]
public ControlStates CurrentState;
}
/// Get current text part to the attached ButtonExtension.
/// </summary>
/// <remarks>
- /// It returns null if the passed extension is invaild.
+ /// It returns null if the passed extension is invalid.
/// </remarks>
/// <param name="extension">The extension instance that is currently attached to this Button.</param>
/// <return>The button's text part.</return>
/// Get current icon part to the attached ButtonExtension.
/// </summary>
/// <remarks>
- /// It returns null if the passed extension is invaild.
+ /// It returns null if the passed extension is invalid.
/// </remarks>
/// <param name="extension">The extension instance that is currently attached to this Button.</param>
/// <return>The button's icon part.</return>
/// Get current overlay image part to the attached ButtonExtension.
/// </summary>
/// <remarks>
- /// It returns null if the passed extension is invaild.
+ /// It returns null if the passed extension is invalid.
/// </remarks>
/// <param name="extension">The extension instance that is currently attached to this Button.</param>
/// <return>The button's overlay image part.</return>