/* * Copyright(c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System.ComponentModel; using Tizen.NUI.BaseComponents; using Tizen.NUI.Binding; namespace Tizen.NUI.Components { /// /// PaginationStyle used to config the pagination represent. /// /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public class PaginationStyle : ControlStyle { static PaginationStyle() { } /// /// Creates a new instance of a PaginationStyle. /// /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public PaginationStyle() : base() { } /// /// Creates a new instance of a PaginationStyle using style. /// /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public PaginationStyle(PaginationStyle style) : base(style) { if (null == style) return; this.CopyFrom(style); } /// /// Gets or sets the size of the indicator. /// /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public Size IndicatorSize { get; set; } /// /// Gets or sets the resource of indicator. /// /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public Selector IndicatorImageURL { get; set; } = new Selector(); /// /// Gets or sets the space of the indicator. /// /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public int IndicatorSpacing { get; set; } /// /// Retrieves a copy of PaginationStyle. /// /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public override void CopyFrom(BindableObject bindableObject) { base.CopyFrom(bindableObject); PaginationStyle paginationStyle = bindableObject as PaginationStyle; if (null != paginationStyle) { if (null != paginationStyle.IndicatorSize) { IndicatorSize = new Size(paginationStyle.IndicatorSize.Width, paginationStyle.IndicatorSize.Height); } if (null != paginationStyle.IndicatorImageURL) { IndicatorImageURL.Clone(paginationStyle.IndicatorImageURL); } IndicatorSpacing = paginationStyle.IndicatorSpacing; } } } }