2 * Copyright(c) 2021 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;
21 namespace Tizen.NUI.Components
24 /// TabButtonGroup class is used to group together a set of TabButton controls.
25 /// It enables a user to select exclusively single TabButton of a group.
27 [EditorBrowsable(EditorBrowsableState.Never)]
28 public class TabButtonGroup : SelectGroup
31 /// Constructs TabButtonGroup
33 [EditorBrowsable(EditorBrowsableState.Never)]
34 public TabButtonGroup() : base()
36 EnableMultiSelection = false;
40 /// Adds a tab button to the end of TabButtonGroup.
42 /// <param name="tabButton">A tab button to be added to the group.</param>
43 /// <exception cref="ArgumentNullException">Thrown when the argument tabButton is null.</exception>
44 [EditorBrowsable(EditorBrowsableState.Never)]
45 public void Add(TabButton tabButton)
47 if (tabButton == null)
49 throw new ArgumentNullException(nameof(tabButton), "tabButton should not be null.");
52 base.AddSelection(tabButton);
56 /// Removes a tab button from TabButtonGroup.
58 /// <param name="tabButton">A tab button to be removed from the group.</param>
59 /// <exception cref="ArgumentNullException">Thrown when the argument tabButton is null.</exception>
60 [EditorBrowsable(EditorBrowsableState.Never)]
61 public void Remove(TabButton tabButton)
63 if (tabButton == null)
65 throw new ArgumentNullException(nameof(tabButton), "tabButton should not be null.");
68 base.RemoveSelection(tabButton);