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 /// The default DropDown style
25 [EditorBrowsable(EditorBrowsableState.Never)]
26 public class DefaultDropDownStyle : StyleBase
29 /// Return default DropDown style
31 internal protected override ViewStyle GetViewStyle()
33 DropDownStyle style = new DropDownStyle
35 Position = new Position(50, 50),
36 // WidthResizePolicy = ResizePolicyType.FitToChildren,
37 // HeightResizePolicy = ResizePolicyType.FitToChildren,
38 // HeaderText = new TextLabelStyle
40 // Text = new Selector<string> { All = "TitleArea" },
41 // PointSize = new Selector<float?> { All = 28 },
42 // TextColor = new Selector<Color> { All = new Color(0, 0, 0, 1) },
43 // FontFamily = "SamsungOneUI 500C",
45 // BackgroundColor = new Selector<Color> { All = new Color(1, 1, 1, 1) },
47 Button = new ButtonStyle
49 ParentOrigin = ParentOrigin.TopLeft,
50 PivotPoint = PivotPoint.TopLeft,
51 BackgroundImage = new Selector<string>
53 Normal = DefaultStyle.GetResourcePath("nui_component_default_checkbox_bg_n.png"),
54 Pressed = DefaultStyle.GetResourcePath("nui_component_default_checkbox_bg_p.png")
56 BackgroundImageBorder = (Rectangle)6,
57 Text = new TextLabelStyle
59 Text = "Select an item",
60 PointSize = DefaultStyle.PointSizeNormal,
61 TextColor = Color.Black,
63 Icon = new ImageViewStyle
65 Size = new Size(28, 28),
66 ResourceUrl = DefaultStyle.GetResourcePath("nui_component_default_dropdown_button_icon.png"),
68 IconRelativeOrientation = Button.IconOrientation.Right,
71 ListBackgroundImage = new ImageViewStyle
73 ResourceUrl = DefaultStyle.GetResourcePath("nui_component_default_dropdown_list_bg.png"),
74 Border = (Rectangle)6,
75 Size = new Size(280, 360),
77 SpaceBetweenButtonTextAndIcon = 10,
85 /// The default DropDownItem style
87 [EditorBrowsable(EditorBrowsableState.Never)]
88 public class DefaultDropDownItemStyle : StyleBase
91 /// Return default DropDownItem style
93 internal protected override ViewStyle GetViewStyle()
95 DropDownItemStyle style = new DropDownItemStyle
97 Size = new Size(360, 50),
98 BackgroundColor = new Selector<Color>
100 Pressed = new Color(0.05f, 0.63f, 0.9f, 1),
101 Selected = new Color(0.8f, 0.8f, 0.8f, 1),
102 Normal = new Color(1, 1, 1, 1),
104 Text = new TextLabelStyle
106 PointSize = DefaultStyle.PointSizeNormal,
107 Position = new Position(28, 0),