2 * Copyright(c) 2020 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.
17 using System.ComponentModel;
18 using Tizen.NUI.BaseComponents;
20 namespace Tizen.NUI.Components
23 /// TabButton is a class which is used for selecting one content in a TabView.
25 [EditorBrowsable(EditorBrowsableState.Never)]
26 public class TabButton : SelectButton
29 /// Creates a new instance of TabButton.
31 [EditorBrowsable(EditorBrowsableState.Never)]
34 GridLayout.SetHorizontalStretch(this, GridLayout.StretchFlags.ExpandAndFill);
38 /// Sets the control state of a TabButton.
39 /// TabButton needs to support this API since 'View.ControlState' is protected
40 /// and cannot be reached by TabButtonGroup.
42 [EditorBrowsable(EditorBrowsableState.Never)]
43 internal void SetTabButtonState(ControlState controlState)
45 base.ControlState = controlState;
49 /// Sets Button.IsSelected to true after selecting TabButton since it is
50 /// set to false when re-selected according to Button's logic.
52 [EditorBrowsable(EditorBrowsableState.Never)]
53 protected override void OnSelectedChanged()
55 ControlState = ControlState.Pressed;