1 using System.ComponentModel;
2 using Tizen.NUI.BaseComponents;
4 namespace Tizen.NUI.Components
6 public partial class DropDown
8 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
9 [EditorBrowsable(EditorBrowsableState.Never)]
10 internal class DropDownItemView : Control
12 private TextLabel mText = null;
13 private ImageView mIcon = null;
14 private ImageView mCheck = null;
16 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
17 [EditorBrowsable(EditorBrowsableState.Never)]
18 public DropDownItemView() : base() { }
20 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
21 [EditorBrowsable(EditorBrowsableState.Never)]
22 public Selector<Color> BackgroundColorSelector { get; set; }
24 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
25 [EditorBrowsable(EditorBrowsableState.Never)]
30 return (null == mText) ? null : mText.Text;
39 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
40 [EditorBrowsable(EditorBrowsableState.Never)]
41 public string FontFamily
45 return (null == mText) ? null : mText.FontFamily;
50 mText.FontFamily = value;
54 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
55 [EditorBrowsable(EditorBrowsableState.Never)]
56 public float? PointSize
60 return (null == mText) ? 0 : mText.PointSize;
65 mText.PointSize = (float)value;
69 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
70 [EditorBrowsable(EditorBrowsableState.Never)]
71 public Color TextColor
75 return (null == mText) ? null : mText.TextColor;
80 mText.TextColor = value;
84 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
85 [EditorBrowsable(EditorBrowsableState.Never)]
86 public Position TextPosition
90 return (null == mText) ? null : mText.Position;
95 mText.Position = value;
99 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
100 [EditorBrowsable(EditorBrowsableState.Never)]
101 public string IconResourceUrl
105 return (null == mIcon) ? null : mIcon.ResourceUrl;
110 mIcon.ResourceUrl = value;
114 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
115 [EditorBrowsable(EditorBrowsableState.Never)]
120 return (null == mIcon) ? null : mIcon.Size;
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 Position IconPosition
135 return (null == mIcon) ? null : mIcon.Position;
140 mIcon.Position = value;
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 string CheckResourceUrl
150 return (null == mCheck) ? null : mCheck.ResourceUrl;
155 mCheck.ResourceUrl = value;
159 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
160 [EditorBrowsable(EditorBrowsableState.Never)]
161 public Position CheckPosition
165 return (null == mCheck) ? null : mCheck.Position;
170 mCheck.Position = value;
174 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
175 [EditorBrowsable(EditorBrowsableState.Never)]
176 public Size CheckImageSize
180 return (null == mCheck) ? null : mCheck.Size;
189 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
190 [EditorBrowsable(EditorBrowsableState.Never)]
191 public bool IsSelected
195 return (null == mCheck) ? false : mCheck.Visibility;
202 ControlState = ControlState.Selected;
207 ControlState = ControlState.Normal;
213 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
214 [EditorBrowsable(EditorBrowsableState.Never)]
215 protected override void Dispose(DisposeTypes type)
222 if (type == DisposeTypes.Explicit)
249 /// Get DropDownItemView style.
251 /// <returns>The empty.</returns>
252 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
253 [EditorBrowsable(EditorBrowsableState.Never)]
254 protected override ViewStyle CreateViewStyle()
256 return new DropDownItemStyle();
259 private void CreateIcon()
263 mIcon = new ImageView()
265 PositionUsesPivotPoint = true,
266 ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
267 PivotPoint = Tizen.NUI.PivotPoint.TopLeft,
273 private void CreateText()
277 mText = new TextLabel()
279 PositionUsesPivotPoint = true,
280 ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
281 PivotPoint = Tizen.NUI.PivotPoint.TopLeft,
282 WidthResizePolicy = ResizePolicyType.UseNaturalSize,
283 HeightResizePolicy = ResizePolicyType.FillToParent,
284 VerticalAlignment = VerticalAlignment.Center,
285 HorizontalAlignment = HorizontalAlignment.Begin,
291 private void CreateCheckImage()
295 mCheck = new ImageView()
297 PositionUsesPivotPoint = true,
298 ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
299 PivotPoint = Tizen.NUI.PivotPoint.TopLeft,
300 Name = "checkedImage",