2 * Copyright(c) 2021 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.
18 using System.ComponentModel;
19 using Tizen.NUI.BaseComponents;
20 using Tizen.NUI.Binding;
21 using Tizen.NUI.Components.Extension;
23 namespace Tizen.NUI.Components
26 /// DefaultLinearItemStyle is a class which saves DefaultLinearItem's ux data.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class DefaultLinearItemStyle : RecyclerViewItemStyle
31 static DefaultLinearItemStyle() { }
34 /// Creates a new instance of a DefaultLinearItemStyle.
36 /// <since_tizen> 8 </since_tizen>
37 public DefaultLinearItemStyle() : base()
42 /// Creates a new instance of a DefaultLinearItemStyle with style.
44 /// <param name="style">Create DefaultLinearItemStyle by style customized by user.</param>
45 [EditorBrowsable(EditorBrowsableState.Never)]
46 public DefaultLinearItemStyle(DefaultLinearItemStyle style) : base(style)
51 /// Label Text's style.
53 [EditorBrowsable(EditorBrowsableState.Never)]
54 public TextLabelStyle Label { get; set; } = new TextLabelStyle();
57 /// Sublabel Text's style.
59 [EditorBrowsable(EditorBrowsableState.Never)]
60 public TextLabelStyle SubLabel { get; set; } = new TextLabelStyle();
65 [EditorBrowsable(EditorBrowsableState.Never)]
66 public ViewStyle Icon { get; set; } = new ViewStyle();
71 [EditorBrowsable(EditorBrowsableState.Never)]
72 public ViewStyle Extra { get; set; } = new ViewStyle();
75 /// Seperator's style.
77 [EditorBrowsable(EditorBrowsableState.Never)]
78 public ViewStyle Seperator { get; set; } = new ViewStyle();
81 [EditorBrowsable(EditorBrowsableState.Never)]
82 public override void CopyFrom(BindableObject bindableObject)
84 base.CopyFrom(bindableObject);
86 if (bindableObject is DefaultLinearItemStyle RecyclerViewItemStyle)
88 Label.CopyFrom(RecyclerViewItemStyle.Label);
89 SubLabel.CopyFrom(RecyclerViewItemStyle.SubLabel);
90 Icon.CopyFrom(RecyclerViewItemStyle.Icon);
91 Extra.CopyFrom(RecyclerViewItemStyle.Extra);
92 Seperator.CopyFrom(RecyclerViewItemStyle.Seperator);