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.Collections.Generic;
19 using Tizen.NUI.BaseComponents;
20 using System.ComponentModel;
21 using Tizen.NUI.Binding;
23 namespace Tizen.NUI.Components
26 /// DropDown is one kind of common component, a dropdown allows the user click dropdown button to choose one value from a list.
28 /// <since_tizen> 6 </since_tizen>
29 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
30 [EditorBrowsable(EditorBrowsableState.Never)]
31 public partial class DropDown : Control
33 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
34 [EditorBrowsable(EditorBrowsableState.Never)]
35 public static readonly BindableProperty ListPaddingProperty = BindableProperty.Create(nameof(ListPadding), typeof(Extents), typeof(DropDown), null, propertyChanged: (bindable, oldValue, newValue) =>
37 var instance = (DropDown)bindable;
40 instance.listPadding.CopyFrom((Extents)newValue);
41 instance.UpdateDropDown();
44 defaultValueCreator: (bindable) =>
46 var instance = (DropDown)bindable;
47 return instance.listPadding;
49 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
50 [EditorBrowsable(EditorBrowsableState.Never)]
51 public static readonly BindableProperty SelectedItemIndexProperty = BindableProperty.Create(nameof(SelectedItemIndex), typeof(int), typeof(DropDown), 0, propertyChanged: (bindable, oldValue, newValue) =>
53 var instance = (DropDown)bindable;
56 int selectedItemIndex = (int)newValue;
57 if (selectedItemIndex == instance.selectedItemIndex || instance.adapter == null || selectedItemIndex < 0 || selectedItemIndex >= instance.adapter.GetItemCount())
61 instance.SetListItemToSelected((uint)selectedItemIndex);
64 defaultValueCreator: (bindable) =>
66 var instance = (DropDown)bindable;
67 return instance.selectedItemIndex;
69 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
70 [EditorBrowsable(EditorBrowsableState.Never)]
71 public static readonly BindableProperty ListMarginProperty = BindableProperty.Create(nameof(ListMargin), typeof(Extents), typeof(DropDown), null, propertyChanged: (bindable, oldValue, newValue) =>
73 var instance = (DropDown)bindable;
76 instance.listMargin.CopyFrom((Extents)newValue);
77 instance.UpdateDropDown();
80 defaultValueCreator: (bindable) =>
82 var instance = (DropDown)bindable;
83 return instance.listMargin;
85 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
86 [EditorBrowsable(EditorBrowsableState.Never)]
87 public static readonly BindableProperty ListRelativeOrientationProperty = BindableProperty.Create(nameof(ListRelativeOrientation), typeof(ListOrientation), typeof(DropDown), ListOrientation.Left, propertyChanged: (bindable, oldValue, newValue) =>
89 var instance = (DropDown)bindable;
92 instance.listRelativeOrientation = (ListOrientation)newValue;
93 instance.UpdateDropDown();
96 defaultValueCreator: (bindable) =>
98 var instance = (DropDown)bindable;
99 return instance.listRelativeOrientation;
101 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
102 [EditorBrowsable(EditorBrowsableState.Never)]
103 public static readonly BindableProperty SpaceBetweenButtonTextAndIconProperty = BindableProperty.Create(nameof(SpaceBetweenButtonTextAndIcon), typeof(int), typeof(DropDown), 0, propertyChanged: (bindable, oldValue, newValue) =>
105 var instance = (DropDown)bindable;
106 if (newValue != null)
108 instance.spaceBetweenButtonTextAndIcon = (int)newValue;
111 defaultValueCreator: (bindable) =>
113 var instance = (DropDown)bindable;
114 return instance.spaceBetweenButtonTextAndIcon;
118 private Button button = null;
119 private TextLabel headerText = null;
120 private TextLabel buttonText = null;
121 private ImageView listBackgroundImage = null;
122 // Component that scrolls the child added to it.
123 private ScrollableBase scrollableBase = null;
125 // The LinearLayout container to house the items in the drop down list.
126 private View dropDownMenuFullList = null;
127 private DropDownListBridge adapter = new DropDownListBridge();
128 private DropDownItemView selectedItemView = null;
129 private TapGestureDetector tapGestureDetector = null;
131 private Extents listMargin = new Extents(0, 0, 0, 0);
132 private Extents listPadding = new Extents(0, 0, 0, 0);
133 private ListOrientation listRelativeOrientation = ListOrientation.Left;
134 private int selectedItemIndex = -1;
135 private int spaceBetweenButtonTextAndIcon = 0;
136 private bool itemPressed = false;
138 static DropDown() { }
141 /// Creates a new instance of a DropDown.
143 /// <since_tizen> 6 </since_tizen>
144 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
145 [EditorBrowsable(EditorBrowsableState.Never)]
146 public DropDown() : base() { }
149 /// Creates a new instance of a DropDown with style.
151 /// <param name="style">Create DropDown by special style defined in UX.</param>
152 /// <since_tizen> 6 </since_tizen>
153 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
154 [EditorBrowsable(EditorBrowsableState.Never)]
155 public DropDown(string style) : base(style) { }
158 /// Creates a new instance of a DropDown with style.
160 /// <param name="dropDownStyle">Create DropDown by style customized by user.</param>
161 /// <since_tizen> 6 </since_tizen>
162 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
163 [EditorBrowsable(EditorBrowsableState.Never)]
164 public DropDown(DropDownStyle dropDownStyle) : base(dropDownStyle)
169 /// An event for the item clicked signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
171 /// <since_tizen> 6 </since_tizen>
172 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
173 [EditorBrowsable(EditorBrowsableState.Never)]
174 public event EventHandler<ItemClickEventArgs> ItemClickEvent;
177 /// List position in relation to the main button.
179 /// <since_tizen> 6 </since_tizen>
180 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
181 [EditorBrowsable(EditorBrowsableState.Never)]
182 public enum ListOrientation
187 /// <since_tizen> 6 </since_tizen>
188 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
189 [EditorBrowsable(EditorBrowsableState.Never)]
194 /// <since_tizen> 6 </since_tizen>
195 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
196 [EditorBrowsable(EditorBrowsableState.Never)]
201 /// Get or set header text.
203 /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
204 [EditorBrowsable(EditorBrowsableState.Never)]
205 public TextLabel HeaderText
209 if (null == headerText)
211 headerText = new TextLabel()
213 WidthResizePolicy = ResizePolicyType.UseNaturalSize,
214 HeightResizePolicy = ResizePolicyType.UseNaturalSize,
215 HorizontalAlignment = HorizontalAlignment.Center,
216 VerticalAlignment = VerticalAlignment.Center,
217 ParentOrigin = NUI.ParentOrigin.Center,
218 PivotPoint = NUI.ParentOrigin.Center,
219 PositionUsesPivotPoint = true,
220 Name = "DropDownHeaderText"
233 /// Get or set button.
235 /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
236 [EditorBrowsable(EditorBrowsableState.Never)]
243 button = new Button()
245 ParentOrigin = NUI.ParentOrigin.CenterLeft,
246 PivotPoint = NUI.PivotPoint.CenterLeft,
247 PositionUsesPivotPoint = true,
248 HeightResizePolicy = ResizePolicyType.FitToChildren,
249 IconRelativeOrientation = Button.IconOrientation.Right,
250 Name = "DropDownButton"
252 button.ClickEvent += ButtonClickEvent;
255 if (null == buttonText)
257 buttonText = new TextLabel();
269 /// Get or set the background image of list.
271 /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
272 [EditorBrowsable(EditorBrowsableState.Never)]
273 public ImageView ListBackgroundImage
277 if (null == listBackgroundImage)
279 listBackgroundImage = new ImageView()
281 Name = "ListBackgroundImage",
282 PositionUsesPivotPoint = true,
283 ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
284 PivotPoint = Tizen.NUI.PivotPoint.TopLeft,
285 WidthResizePolicy = ResizePolicyType.FitToChildren,
286 HeightResizePolicy = ResizePolicyType.FitToChildren,
288 Add(listBackgroundImage);
290 if (null == scrollableBase) // scrollableBase used to test of ListContainer Setup invoked already
292 SetUpListContainer();
295 return listBackgroundImage;
299 listBackgroundImage = value;
304 /// Return a copied Style instance of DropDown
307 /// It returns copied Style instance and changing it does not effect to the DropDown.
308 /// Style setting is possible by using constructor or the function of ApplyStyle(ViewStyle viewStyle)
310 /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
311 [EditorBrowsable(EditorBrowsableState.Never)]
312 //public new DropDownStyle Style
316 // return new DropDownStyle(ViewStyle as DropDownStyle);
319 public new DropDownStyle Style => ViewStyle as DropDownStyle;
322 /// Space between button text and button icon in DropDown.
324 /// <since_tizen> 6 </since_tizen>
325 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
326 public int SpaceBetweenButtonTextAndIcon
328 get => (int)GetValue(SpaceBetweenButtonTextAndIconProperty);
329 set => SetValue(SpaceBetweenButtonTextAndIconProperty, value);
333 /// List relative orientation in DropDown.
335 /// <since_tizen> 6 </since_tizen>
336 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
337 public ListOrientation ListRelativeOrientation
339 get => (ListOrientation)GetValue(ListRelativeOrientationProperty);
340 set => SetValue(ListRelativeOrientationProperty, value);
346 /// <since_tizen> 6 </since_tizen>
347 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
348 public Extents ListMargin
352 Extents tmp = (Extents)GetValue(ListMarginProperty);
353 return new Extents((ushort start, ushort end, ushort top, ushort bottom) => { ListMargin = new Extents(start, end, top, bottom); }, tmp.Start, tmp.End, tmp.Top, tmp.Bottom);
355 set => SetValue(ListMarginProperty, value);
359 /// Selected item index in list.
361 /// <since_tizen> 6 </since_tizen>
362 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
363 public int SelectedItemIndex
365 get => (int)GetValue(SelectedItemIndexProperty);
366 set => SetValue(SelectedItemIndexProperty, value);
370 /// List padding in DropDown.
372 /// <since_tizen> 6 </since_tizen>
373 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
374 public Extents ListPadding
378 Extents tmp = (Extents)GetValue(ListPaddingProperty);
379 return new Extents((ushort start, ushort end, ushort top, ushort bottom) => { ListPadding = new Extents(start, end, top, bottom); }, tmp.Start, tmp.End, tmp.Top, tmp.Bottom);
381 set => SetValue(ListPaddingProperty, value);
385 /// Add list item by item data. The added item will be added to end of all items automatically.
387 /// <param name="itemData">Item data which will apply to tab item view.</param>
388 /// <since_tizen> 6 </since_tizen>
389 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
390 [EditorBrowsable(EditorBrowsableState.Never)]
391 public void AddItem(DropDownDataItem itemData)
393 // Add item to adaptor, will be added to list via AddItemAt during OnUpdate()
394 int insertionPosition = adapter.GetItemCount();
395 adapter.InsertData(insertionPosition, itemData);
399 /// Delete list item by index.
401 /// <param name="index">Position index where will be deleted.</param>
402 /// <since_tizen> 6 </since_tizen>
403 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
404 [EditorBrowsable(EditorBrowsableState.Never)]
405 public void DeleteItem(int index)
407 if (index < 0 || index >= adapter?.GetItemCount()) return;
408 if (null == dropDownMenuFullList) return;
410 if (selectedItemIndex == index)
412 selectedItemIndex = -1;
414 else if(selectedItemIndex > index)
419 adapter?.RemoveData(index);
421 if(index < dropDownMenuFullList.ChildCount)
423 View childToRemove = dropDownMenuFullList.GetChildAt((uint)index);
426 childToRemove.TouchEvent -= ListItemTouchEvent;
427 dropDownMenuFullList.Remove(childToRemove);
428 dropDownMenuFullList?.Layout?.RequestLayout();
434 /// Insert list item by item data. The inserted item will be added to the special position by index automatically.
436 /// <param name="item">Item data which will apply to tab item view.</param>
437 /// <param name="index">Position index where will be inserted.</param>
438 /// <since_tizen> 6 </since_tizen>
439 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
440 [EditorBrowsable(EditorBrowsableState.Never)]
441 public void InsertItem(DropDownDataItem item, int index)
443 if (index < 0 || index >= adapter.GetItemCount())
448 if (selectedItemIndex >= index)
453 adapter.InsertData(index, item);
457 /// Add scroll bar to list.
459 /// <param name="scrollBar">Scroll bar defined by user which will be added to list.</param>
460 /// <since_tizen> 6 </since_tizen>
461 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
462 [EditorBrowsable(EditorBrowsableState.Never)]
463 public void AttachScrollBar(ScrollBar scrollBar)
465 if (scrollableBase == null)
469 Tizen.Log.Error("DropDown","Feature unsupported");
473 /// Detach scroll bar to list.
475 /// <since_tizen> 6 </since_tizen>
476 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
477 [EditorBrowsable(EditorBrowsableState.Never)]
478 public void DetachScrollBar()
480 if (scrollableBase == null)
484 Tizen.Log.Error("DropDown","Feature unsupported");
487 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
488 [EditorBrowsable(EditorBrowsableState.Never)]
489 public override void ApplyStyle(ViewStyle viewStyle)
491 base.ApplyStyle(viewStyle);
493 DropDownStyle dropDownStyle = viewStyle as DropDownStyle;
494 if (null != dropDownStyle)
496 if (null != dropDownStyle.Button)
498 Button.ApplyStyle(dropDownStyle.Button);
500 if (null != dropDownStyle.HeaderText)
502 HeaderText.ApplyStyle(dropDownStyle.HeaderText);
504 if (null != dropDownStyle.ListBackgroundImage)
506 ListBackgroundImage.ApplyStyle(dropDownStyle.ListBackgroundImage);
513 /// Update DropDown by style.
515 /// <since_tizen> 6 </since_tizen>
516 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
517 [EditorBrowsable(EditorBrowsableState.Never)]
518 protected void UpdateDropDown()
520 if (null == scrollableBase || null == listBackgroundImage || null == dropDownMenuFullList) return;
521 if (null == Style.ListBackgroundImage.Size) return;
522 // Resize and position scrolling list within the drop down list container. Can be used to position list in relation to the background image.
523 scrollableBase.Size = Style.ListBackgroundImage.Size - new Size((listPadding.Start + listPadding.End), (listPadding.Top + listPadding.Bottom), 0);
524 scrollableBase.Position2D = new Position2D(listPadding.Start, listPadding.Top);
526 int listBackgroundImageX = 0;
527 int listBackgroundImageY = 0;
528 if (listRelativeOrientation == ListOrientation.Left)
530 listBackgroundImageX = (int)listMargin.Start;
531 listBackgroundImageY = (int)listMargin.Top;
533 else if (listRelativeOrientation == ListOrientation.Right)
535 listBackgroundImageX = -(int)listMargin.End;
536 listBackgroundImageY = (int)listMargin.Top;
538 listBackgroundImage.Position2D = new Position2D(listBackgroundImageX, listBackgroundImageY);
539 dropDownMenuFullList?.Layout?.RequestLayout();
545 protected override void OnUpdate()
547 float buttonTextWidth = 0;
548 if (null != buttonText)
550 buttonText.Text = Style.Button.Text.Text.All;
551 buttonText.PointSize = Style.Button.Text.PointSize?.GetValue(ControlState) ?? StyleManager.PointSizeNormal;
552 buttonTextWidth = buttonText.NaturalSize.Width;
554 float fitWidth = (Style.Button.Icon.Size?.Width ?? 48) + Style.SpaceBetweenButtonTextAndIcon + buttonTextWidth;
555 fitWidth += (button.IconPadding.Start + button.IconPadding.End);
556 button.Size.Width = Math.Max(button.Size.Width, fitWidth);
559 int numberOfItemsToAdd = adapter.GetItemCount();
561 if (adapter.AdapterPurge == true)
563 adapter.AdapterPurge = false;
564 for (int i = 0; i < numberOfItemsToAdd; i++)
566 AddItemAt(adapter.GetData(i), i);
569 // Set selection icon on View
570 if (selectedItemIndex > 0)
572 SetListItemToSelected((uint)selectedItemIndex, selectedItemView);
577 /// Dispose DropDown and all children on it.
579 /// <param name="type">Dispose type.</param>
580 /// <since_tizen> 6 </since_tizen>
581 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
582 [EditorBrowsable(EditorBrowsableState.Never)]
583 protected override void Dispose(DisposeTypes type)
590 if (type == DisposeTypes.Explicit)
592 Utility.Dispose(headerText);
593 Utility.Dispose(buttonText);
594 Utility.Dispose(button);
595 Utility.Dispose(scrollableBase);
596 Utility.Dispose(dropDownMenuFullList);
597 Utility.Dispose(listBackgroundImage);
604 /// Get DropDown style.
606 /// <returns>The default dropdown style.</returns>
607 /// <since_tizen> 6 </since_tizen>
608 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
609 [EditorBrowsable(EditorBrowsableState.Never)]
610 protected override ViewStyle CreateViewStyle()
612 return new DropDownStyle();
615 private void AddItemAt(DropDownDataItem itemData,int index)
617 ViewHolder viewHolder = adapter.OnCreateViewHolder();
618 if (!viewHolder.IsBound)
620 adapter.BindViewHolder(viewHolder, index);
621 viewHolder.IsBound = true;
624 if (tapGestureDetector == null)
626 tapGestureDetector = new TapGestureDetector();
628 View view = viewHolder.ItemView;
629 view.ApplyStyle(itemData.itemDataStyle);
630 view.TouchEvent += ListItemTouchEvent;
631 dropDownMenuFullList.Add(view);
634 private void OnClickEvent(object sender, ItemClickEventArgs e)
636 ItemClickEvent?.Invoke(sender, e);
639 private void CreateButtonText()
641 if (null == buttonText)
643 buttonText = new TextLabel();
647 private void CreateButton()
651 button = new Button()
653 ParentOrigin = NUI.ParentOrigin.CenterLeft,
654 PivotPoint = NUI.PivotPoint.CenterLeft,
655 PositionUsesPivotPoint = true,
656 HeightResizePolicy = ResizePolicyType.FitToChildren,
657 IconRelativeOrientation = Button.IconOrientation.Right,
659 button.Name = "DropDownButton";
660 button.ClickEvent += ButtonClickEvent;
665 private void SetUpListContainer()
667 LinearLayout linear = new LinearLayout()
669 LinearOrientation = LinearLayout.Orientation.Vertical,
672 dropDownMenuFullList = new View()
675 Name = "DropDownMenuList",
676 WidthSpecification = LayoutParamPolicies.MatchParent,
677 HeightSpecification = LayoutParamPolicies.WrapContent,
681 scrollableBase = new ScrollableBase()
685 scrollableBase.Add(dropDownMenuFullList);
687 listBackgroundImage.Add(scrollableBase);
688 listBackgroundImage.Hide();
691 private View GetViewFromIndex(uint index)
693 if ((index < dropDownMenuFullList.ChildCount) && (index >=0) )
695 return dropDownMenuFullList.GetChildAt(index);
703 private void SetListItemToSelected(DropDownItemView view)
705 if (dropDownMenuFullList == null || view == null || view == selectedItemView)
710 uint newSelectedIndex = 0;
711 for (; newSelectedIndex < dropDownMenuFullList.ChildCount; newSelectedIndex++)
713 var itemView = dropDownMenuFullList.GetChildAt(newSelectedIndex) as DropDownItemView;
714 if (itemView == view)
716 SetListItemToSelected(newSelectedIndex, view);
722 private void SetListItemToSelected(uint index)
724 if (dropDownMenuFullList == null || index == selectedItemIndex)
729 SetListItemToSelected(index, GetViewFromIndex(index) as DropDownItemView);
732 private void SetListItemToSelected(uint index, DropDownItemView view)
739 if (selectedItemView != null)
741 selectedItemView.IsSelected = false;
742 adapter.GetData(selectedItemIndex).IsSelected = false;
745 if (view == null || index >= dropDownMenuFullList.ChildCount)
747 selectedItemIndex = -1;
748 selectedItemView = null;
752 selectedItemIndex = (int)index;
753 selectedItemView = view;
754 selectedItemView.IsSelected = true;
755 adapter.GetData(selectedItemIndex).IsSelected = true;
756 dropDownMenuFullList.Layout?.RequestLayout();
759 private bool ListItemTouchEvent(object sender, TouchEventArgs e)
761 PointStateType state = e.Touch.GetState(0);
762 DropDownItemView touchedView = sender as DropDownItemView;
764 touchedView.OnTouch(e.Touch); // Handle control state change
768 case PointStateType.Down:
769 itemPressed = true; // if matched with a Up then a click event.
771 case PointStateType.Motion:
774 case PointStateType.Up:
775 if (touchedView != null)
777 if (itemPressed) // if Down was previously sent without motion (Scrolling) in-between then a clicked event occurred.
780 Console.WriteLine("Tapped{0}", touchedView.Name);
781 SetListItemToSelected(touchedView);
782 button.Text = touchedView.Text;
784 listBackgroundImage.Hide();
794 private void ButtonClickEvent(object sender, Button.ClickEventArgs e)
797 listBackgroundImage.Show();
798 dropDownMenuFullList?.Layout?.RequestLayout();
799 listBackgroundImage.RaiseToTop();
804 #region ItemClickEventArgs
806 /// ItemClickEventArgs is a class to record item click event arguments which will sent to user.
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 public class ItemClickEventArgs : EventArgs
813 /// <summary> Clicked item index of DropDown's list </summary>
814 /// <since_tizen> 6 </since_tizen>
815 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
816 [EditorBrowsable(EditorBrowsableState.Never)]
817 public int Index { get; set; }
818 /// <summary> Clicked item text string of DropDown's list </summary>
819 /// <since_tizen> 6 </since_tizen>
820 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
821 [EditorBrowsable(EditorBrowsableState.Never)]
822 public string Text { get; set; }
829 /// A ViewHolder is a class that holds a View created from DropDownListBridge data.
831 /// <since_tizen> 6 </since_tizen>
832 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
833 [EditorBrowsable(EditorBrowsableState.Never)]
834 public class ViewHolder
837 /// ViewHolder constructor.
839 /// <param name="itemView">View</param>
840 /// <since_tizen> 6 </since_tizen>
841 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
842 [EditorBrowsable(EditorBrowsableState.Never)]
843 public ViewHolder(View itemView)
845 ItemView = itemView ?? throw new ArgumentNullException(nameof(itemView), "itemView may not be null");
849 /// Returns the view.
851 /// <since_tizen> 6 </since_tizen>
852 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
853 [EditorBrowsable(EditorBrowsableState.Never)]
854 public View ItemView { get; }
856 internal bool IsBound { get; set; }