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.
17 using System.ComponentModel;
18 using Tizen.NUI.BaseComponents;
19 using Tizen.NUI.Binding;
21 namespace Tizen.NUI.Components
24 /// PaginationStyle used to config the pagination represent.
26 /// <since_tizen> 6 </since_tizen>
27 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class PaginationStyle : ControlStyle
31 static PaginationStyle() { }
34 /// Creates a new instance of a PaginationStyle.
36 /// <since_tizen> 6 </since_tizen>
37 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
38 [EditorBrowsable(EditorBrowsableState.Never)]
39 public PaginationStyle() : base() { }
42 /// Creates a new instance of a PaginationStyle using style.
44 /// <since_tizen> 6 </since_tizen>
45 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
46 [EditorBrowsable(EditorBrowsableState.Never)]
47 public PaginationStyle(PaginationStyle style) : base(style)
49 if (null == style) return;
55 /// Gets or sets the size of the indicator.
57 /// <since_tizen> 6 </since_tizen>
58 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
59 [EditorBrowsable(EditorBrowsableState.Never)]
60 public Size IndicatorSize { get; set; }
63 /// Gets or sets the resource of indicator.
65 /// <since_tizen> 6 </since_tizen>
66 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
67 [EditorBrowsable(EditorBrowsableState.Never)]
68 public Selector<string> IndicatorImageURL { get; set; } = new Selector<string>();
71 /// Gets or sets the space of the indicator.
73 /// <since_tizen> 6 </since_tizen>
74 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
75 [EditorBrowsable(EditorBrowsableState.Never)]
76 public int IndicatorSpacing { get; set; }
79 /// Retrieves a copy of PaginationStyle.
81 /// <since_tizen> 6 </since_tizen>
82 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
83 [EditorBrowsable(EditorBrowsableState.Never)]
84 public override void CopyFrom(BindableObject bindableObject)
86 base.CopyFrom(bindableObject);
88 PaginationStyle paginationStyle = bindableObject as PaginationStyle;
89 if (null != paginationStyle)
91 if (null != paginationStyle.IndicatorSize)
93 IndicatorSize = new Size(paginationStyle.IndicatorSize.Width, paginationStyle.IndicatorSize.Height);
95 if (null != paginationStyle.IndicatorImageURL)
97 IndicatorImageURL.Clone(paginationStyle.IndicatorImageURL);
99 IndicatorSpacing = paginationStyle.IndicatorSpacing;