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;
19 using Tizen.NUI.Binding;
20 using Tizen.NUI.Components;
22 namespace Tizen.NUI.Wearable
25 /// CircularPaginationStyle used to config the circularPagination represent.
27 /// <since_tizen> 8 </since_tizen>
28 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public class CircularPaginationStyle : ControlStyle
32 static CircularPaginationStyle() { }
35 /// Creates a new instance of a CircularPaginationStyle.
37 /// <since_tizen> 8 </since_tizen>
38 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
39 [EditorBrowsable(EditorBrowsableState.Never)]
40 public CircularPaginationStyle() : base()
46 /// Creates a new instance of a CircularPaginationStyle using style.
48 /// <since_tizen> 8 </since_tizen>
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 CircularPaginationStyle(CircularPaginationStyle style) : base(style)
53 if (null == style) return;
59 /// Gets or sets the size of the indicator.
61 /// <since_tizen> 8 </since_tizen>
62 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
63 [EditorBrowsable(EditorBrowsableState.Never)]
64 public Size IndicatorSize { get; set; }
67 /// Gets or sets the resource of indicator.
69 /// <since_tizen> 8 </since_tizen>
70 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
71 [EditorBrowsable(EditorBrowsableState.Never)]
72 public Selector<string> IndicatorImageURL { get; set; } = new Selector<string>();
75 /// Gets or sets the resource of the center indicator.
77 /// <since_tizen> 8 </since_tizen>
78 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
79 [EditorBrowsable(EditorBrowsableState.Never)]
80 public Selector<string> CenterIndicatorImageURL { get; set; } = new Selector<string>();
83 /// Retrieves a copy of CircularPaginationStyle.
85 /// <since_tizen> 8 </since_tizen>
86 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
87 [EditorBrowsable(EditorBrowsableState.Never)]
88 public override void CopyFrom(BindableObject bindableObject)
90 base.CopyFrom(bindableObject);
92 CircularPaginationStyle circularPaginationStyle = bindableObject as CircularPaginationStyle;
93 if (null != circularPaginationStyle)
95 if (null != circularPaginationStyle.IndicatorSize)
97 IndicatorSize = new Size(circularPaginationStyle.IndicatorSize.Width, circularPaginationStyle.IndicatorSize.Height);
99 if (null != circularPaginationStyle.IndicatorImageURL)
101 IndicatorImageURL?.Clone(circularPaginationStyle.IndicatorImageURL);
103 if (null != circularPaginationStyle.CenterIndicatorImageURL)
105 CenterIndicatorImageURL?.Clone(circularPaginationStyle.CenterIndicatorImageURL);
110 private void Initialize()
112 IndicatorSize = new Size(10, 10);
113 IndicatorImageURL = new Selector<string>()
115 Normal = "/usr/share/dotnet.tizen/framework/res/" + "nui_component_default_pagination_normal_dot.png",
116 Selected = "/usr/share/dotnet.tizen/framework/res/" + "nui_component_default_pagination_focus_dot.png",
118 CenterIndicatorImageURL = new Selector<string>()
120 Normal = "/usr/share/dotnet.tizen/framework/res/" + "nui_wearable_circular_pagination_center_normal_dot.png",
121 Selected = "/usr/share/dotnet.tizen/framework/res/" + "nui_wearable_circular_pagination_center_focus_dot.png",